Scroll Top

Eliminating iOS Build Costs: A Practical Guide to Xcode Cloud

VMware-Cloud-Foundation-image

Introduction

Managing Mac build infrastructure is expensive and time-intensive. Dedicated macOS servers or rented Mac instances require constant maintenance, updates, and troubleshooting. Xcode Cloud eliminates these challenges by providing a fully managed, scalable CI/CD solution for iOS development—with 25 free compute hours per month.

Prerequisites

  • Active Apple Developer Account ($99/year)
  • Xcode installed (version 14.0 or later)
  • Git repository (GitHub, GitLab, or Bitbucket)
  1. Apple Store Connect Setup

Create an Account on Apple Store Connect
  • Log in to the Apple Store and connect with your Apple Developer account.
  • Create an app record with the following:
    • App Name
    • Primary Language
    • Bundle ID (must match the project)
    • SKU (a unique identifier for your app, internal use only)
    • User Access: Assign appropriate roles for developers and grant certificate access permissions

 

Creation of app in XCode Cloud console
Creation of app in XCode Cloud console

 

Adding details for creation of new app
Adding details for creation of new app
  • Assign Developer Roles & Certificate Access
    • Navigate to Users and Access.
    • Add the developer’s Apple ID and assign the role (Developer or App Manager).
    • Ensure permissions for managing certificates, identifiers, and devices are enabled.
  1. Xcode Project Configuration (Ionic iOS Project)

  • Open your Ionic project’s iOS folder in Xcode.
  • Go to the last icon of the left sidebar and choose the “Cloud option” there and sign in with the Apple ID used for Apple Store Connect.
XCode Cloud signup
XCode Cloud signup

 

Assigning App to Xcode
Assigning App to Xcode
  • After sign-in, choose the app that is created in the Xcode console.
  1. Compliance Configuration (Info.plist)

If you encounter “Missing Compliance” issues:

  • Open Info.plist.
  • Add the following entry:
ITSAppUsesNonExemptEncryption
  1. Xcode Cloud Setup

  • Create a Test Group in Xcode Cloud:
    • Go to App Store Connect → TestFlight → Groups.
    • Create a test group and add testers (internal or external).
Test group in Xcode Cloud
Test group in Xcode Cloud
  • Enable Automatic Registration
    • In Xcode, go to Signing & Capabilities and enable the Automatically Manage Signing option.
  1. Create a Workflow in Xcode

  • Navigate to Xcode Menubar → Integrate → Create Workflows.
  • Create a workflow for your project by clicking the “+ icon.”
Creation of Workflow
Creation of Workflow

 

Choose the repository name
Choose the repository name

 

Define build triggers (push, PR, manual).
Define build triggers (push, PR, manual).

 

In the actions, choose Archive-iOS
In the actions, choose Archive-iOS

 

Click the + icon to add the testers group
Click the + icon to add the testers group

 

Choose the testers group you have created in Xcode cloud
Choose the testers group you have created in Xcode cloud

 

Workflows Created for different branches
Workflows Created for different branches
  1. CI Script Configuration

Add ci_post_clone.sh

⚠️ The same naming should be used; don’t alter it.

Create the file:

/ios/App/ci_scripts/ci_post_clone.sh

 

#!/bin/sh

export HOMEBREW_NO_INSTALL_CLEANUP=TRUE

# Install CocoaPods
echo "📦 Install CocoaPods"
brew install cocoapods

# Install Node.js 20
brew install node@20
brew link node@20

# Install dependencies
echo "📦 Installing Node dependencies"
npm config set maxsockets 3
npm i --legacy-peer-deps
# Alternative: pnpm install --frozen-lockfile OR yarn install --frozen-lockfile OR bun install

# Build the app
echo "🏗️ Building Angular project"
npm run build

# Sync with iOS project
echo "🔄 Capacitor iOS Sync"
npx cap sync ios

⚠️ Ensure the script has execute permissions:

chmod +x ios/App/ci_scripts/ci_post_clone.sh
  1. Package.json Updates

Add build and sync commands:

"scripts": {
  "build": "ng build",
  "sync:ios": "cap sync ios"
}

Overview of Xcode Cloud Project:

Artifact storage:

We can store the artifacts in the Xcode Cloud:

Artifacts generated after iOS build
Artifacts generated after iOS build
Test Flight on an iOS Device:
Real device TestFlight
Real device TestFlight

 

Real device TestFlight App info
Real device TestFlight App info

 

Build time:

Time taken for building: 11 minutes

Build time split up
Build time split up

Cost Savings:

 

The Apple Developer Program provides 25 free compute hours per month for Xcode Cloud usage. As a result, we incur no additional costs, allowing us to achieve meaningful savings while still running our iOS build and CI/CD processes efficiently.

Conclusion

Xcode Cloud transforms iOS CI/CD from a costly infrastructure challenge into a streamlined, zero-cost solution. By following this guide, we eliminate the need for dedicated Mac build servers and gain a fully managed platform that scales with our needs. Now, the team can concentrate on developing features rather than handling build servers.

References

How to build Ionic Capacitor app in Xcode Cloud
Build and publish your iOS app to TestFlight using Xcode Cloud

Subhashini S V

+ posts
Privacy Preferences
When you visit our website, it may store information through your browser from specific services, usually in form of cookies. Here you can change your privacy preferences. Please note that blocking some types of cookies may impact your experience on our website and the services we offer.