CI/CD Setup for iOS Applications via Xcode Cloud
Xcode Cloud is Apple's first-party CI/CD. It operates directly within the Xcode IDE and App Store Connect, requiring no separate server or yaml configurations. For teams building iOS only, this is the most pre-configured yet least conflict-prone option within the Apple ecosystem.
What Xcode Cloud Does Well—and Its Limits
Xcode Cloud manages provisioning profiles and certificates itself through App Store Connect. This is the key advantage: no code signing failures in CI, no separate fastlane match Git repository for certificates. Apple simply has access to your developer account and retrieves the needed profile.
Limitations:
- Apple ecosystem only: Swift, Objective-C, Xcode. No Flutter/React Native without a native Xcode target
- Minimal environment customization: cannot install arbitrary brew packages without ci_post_clone.sh scripts
- No self-hosted runner support—Apple cloud only
- Limitation: 25 free compute hours per month (for paid developer account)
Workflow Structure in Xcode Cloud
Configure workflows in Xcode: Product → Xcode Cloud → Manage Workflows. Key parameters:
Start Condition—trigger: push to branch, PR, tag, or manual. For main branch—automatically on each merge. For feature branches—manual only or via PR.
Environment—Xcode version (selected from available options), additional environment variables (API keys, etc.). Secret variables are added in App Store Connect → Xcode Cloud → Secrets, not in the repository.
Actions—step sequence:
- Build—compile with selected scheme and configuration
- Test—run XCTest/XCUITest on simulator or real device
- Archive—create .xcarchive for distribution
- Distribution—TestFlight internal/external or App Store
Post-Actions—Slack, email notifications.
Custom Scripts
Xcode Cloud supports bash scripts in special directories:
ci_scripts/
ci_post_clone.sh # after repository clone
ci_pre_xcodebuild.sh # before build
ci_post_xcodebuild.sh # after build
Example ci_post_clone.sh to install dependencies via mint:
#!/bin/sh
set -e
# Install mint if not present
if ! command -v mint &> /dev/null; then
brew install mint
fi
mint bootstrap
Scripts must be executable (chmod +x). Non-zero exit code fails the entire workflow.
TestFlight Distribution and Review
Xcode Cloud integrates directly with TestFlight. After successful archiving—builds appear in TestFlight automatically. Internal testers (team members in App Store Connect) get access immediately. External testers (up to 10,000)—after Beta App Review (usually 1–3 days for first build).
Important: changes to NSUsageDescription keys in Info.plist may trigger repeated Beta App Review.
Build Monitoring
Workflow status is visible in Xcode (Product → Xcode Cloud → Builds) and App Store Connect. Email notifications on failures—configured there. Logs download from UI, analysis of specific steps—filter by Build, Test, Archive phases.
Timeline
Xcode Cloud workflow setup with Build + Test + TestFlight distribution: 3–5 days. Custom scripts, multiple workflows (feature/main/release), Slack notifications: 1–1.5 weeks. Cost calculated individually.







