How to Build a Mac Catalyst App in GitHub Actions
Build a Catalyst app by passing a -destination of platform=macOS,variant=Mac Catalyst to xcodebuild against your iOS scheme.
Mac Catalyst builds your iPad target as a native Mac app. Target it with -destination "platform=macOS,variant=Mac Catalyst"; the scheme must have Catalyst enabled in the project.
Steps
- Enable Mac Catalyst on the target in Xcode and commit the change.
- Run
xcodebuild buildwith-destination "platform=macOS,variant=Mac Catalyst". - Add
CODE_SIGNING_ALLOWED=NOfor a non-distribution CI build.
Workflow
.github/workflows/ci.yml
jobs:
catalyst:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Build for Catalyst
run: |
xcodebuild build \
-scheme MyApp \
-destination 'platform=macOS,variant=Mac Catalyst' \
CODE_SIGNING_ALLOWED=NOGotchas
- If Catalyst is not enabled on the target, the destination resolves to nothing and xcodebuild reports
Unable to find a destination. - Catalyst uses macOS frameworks; iOS-only APIs may be unavailable and need
#if targetEnvironment(macCatalyst)guards.
Related guides
How to Build a macOS App With xcodebuild in GitHub ActionsBuild a macOS app on a GitHub Actions runner with xcodebuild build, targeting the platform=macOS destination…
How to Build and Archive an iOS App in GitHub ActionsBuild an .xcarchive on a GitHub Actions macOS runner with xcodebuild archive, then export a signed .ipa with…