Running SPM Executables
scd can automatically build, archive, and run executable products on the host platform or on an Android device or emulator. This is done with the run command.
run accepts the same SPM Build Options and Libraries Options as build and archive, and uses them when preparing the file tree archive that contains the executable product before running it.
Use --product to specify which executable product to run. For example, to run a specific product on the host platform:
scd run --product MyExecutableTo run a specific product on a connected Android device or emulator:
scd run --platform android-arm64-v8a --product MyExecutableIf --product is omitted, scd automatically runs the project’s single executable product. This only works when the project has exactly one — if there’s more than one, --product must be specified:
scd run
scd run --platform android-arm64-v8a