supportedDestinations), depending on the SDKs installed in Xcode. watchOS is handled separately — see watchOS apps below.
Arguments
Options
watchOS apps
A watch app is always its own target — Xcode and XcodeGen do not allowwatchos as a shared multiplatform destination, so it can’t be listed alongside the others in --platforms. There are two ways to create one:
-
Standalone watch app — pass
--platforms watchoson its own. Runs on Apple Watch without an iPhone app. Set its deployment target with--watchos-target. -
Companion watch app — pass
--watch-companionalongside an iOS app. This generates the multi-platform app plus a second, embeddedwatchOStarget (bundle id<bundle-id>.watchkitapp) that ships inside the iOS app and auto-installs on the paired Watch. It reuses the app’s SwiftUI sources, so the same views build for both.--watch-companionrequiresiosin--platforms(a companion needs an iPhone host) and honors--watchos-target.
Combining
watchos with other platforms in --platforms (e.g. --platforms ios,watchos) is rejected. Use --watch-companion for a companion, or --platforms watchos on its own for a standalone watch app.JSON Output
--watch-companion, the embedded watch app is reported in platforms as "watchOS (Companion)" alongside the app’s destinations (e.g. ["iOS", "watchOS (Companion)"]).