Skip to content

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.

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.

PlatformHow Swift code is consumed
AndroidSCADE SPM Gradle plugin builds the library and bridges it via @jvm
iOS / macOSXcode 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.