Overview
A multiplatform project is a workspace structure for building Android, iOS, and macOS apps from a single Swift codebase. It consists of a shared SPM package and one native project per platform. scd project initializes the structure and builds each platform using the appropriate build system.
Project structure
Section titled “Project structure”MyApp/ Packages/MyApp/ # Swift library (shared across all platforms) Package.swift Sources/MyApp/
Android/MyApp/ # Android Studio project (Kotlin DSL) app/build.gradle.kts — applies the SCADE SPM Gradle plugin ...
Apple/MyApp/ # Xcode project (iOS + macOS) MyApp.xcodeproj/ — two targets: MyAppIOS and MyAppMacOS Sources/The Swift package in Packages/ is the shared layer. It exports types to Kotlin/Java using @jvm (see swift4j) and is used directly by the Xcode project via a local package reference. Each platform project compiles only its own UI layer — the Swift library is built into it automatically.
How the platforms connect
Section titled “How the platforms connect”| Platform | How Swift code is consumed |
|---|---|
| Android | SCADE SPM Gradle plugin builds the library and bridges it via @jvm |
| iOS / macOS | Xcode imports the SPM package directly as a local dependency |
When to use scd project vs. bare scd build
Section titled “When to use scd project vs. bare scd build”Use scd project when you are starting a new app that needs to run on Android and Apple platforms from the same Swift code.
Use the bare scd build / scd archive commands when you have an existing SPM package and just need to cross-compile it for Android without the full multiplatform scaffold.