Skip to content

Build Platforms

scd supports building, running, testing, and archiving SPM projects for multiple target platforms. The platform is selected with the --platform option. For the full list of platform identifiers, see Platforms in the command line reference.

For the host platform, scd works similarly to the standard swift build and swift run commands, but takes into account Global Options and build configuration. This is the default platform when no --platform is specified.

For Android, scd supports building, running, testing, and archiving SPM projects. Each --platform value corresponds to an Android ABI:

--platform valueABITypical use
android-arm64-v8aARM64Most modern Android devices
android-armeabi-v7aARMv7Older 32-bit ARM devices
android-x86_64x86_64Android emulator
android-x86x86Android emulator (32-bit)

scd provides the full set of commands for the Android workflow, from compiling to running and testing on a device:

CommandDescription
buildCompiles the SPM project for the specified Android ABI
archiveBuilds multi-architecture Android artifacts, producing either a file tree or an AAR archive
testBuilds and deploys an XCTest-based test APK to a connected device or emulator via ADB, running tests automatically
runDeploys and runs executable products on a connected device or emulator via ADB, useful for quick testing

iOS support is very limited for now. scd can build SPM libraries and executables for iOS device (iphoneos) and Simulator (iphonesimulator), but running and testing on iOS is not supported.