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.
Host Platform (macOS)
Section titled “Host Platform (macOS)”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.
Android
Section titled “Android”For Android, scd supports building, running, testing, and archiving SPM projects. Each --platform value corresponds to an Android ABI:
--platform value | ABI | Typical use |
|---|---|---|
android-arm64-v8a | ARM64 | Most modern Android devices |
android-armeabi-v7a | ARMv7 | Older 32-bit ARM devices |
android-x86_64 | x86_64 | Android emulator |
android-x86 | x86 | Android emulator (32-bit) |
scd provides the full set of commands for the Android workflow, from compiling to running and testing on a device:
| Command | Description |
|---|---|
build | Compiles the SPM project for the specified Android ABI |
archive | Builds multi-architecture Android artifacts, producing either a file tree or an AAR archive |
test | Builds and deploys an XCTest-based test APK to a connected device or emulator via ADB, running tests automatically |
run | Deploys 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.