Unleashing the Power of Xcode Cloud for iOS App Development

Saeid Rezaeisadrabadi
5 min readDec 11, 2023

--

In this story, I want to talk about Xcode Cloud and how can you use it for your iOS app.

Xcode Cloud, Apple’s latest offering for developers, is a game-changer in the world of iOS app development. This cloud-based service seamlessly integrates into the Xcode IDE, offering a range of features designed to streamline the development, testing, and delivery of iOS apps. In this blog post, we’ll delve into the key aspects of Xcode Cloud and explore how it can revolutionize your app development process.

Getting Started with Xcode Cloud:

Requirements

To use Xcode Cloud, you must:

  1. Be enrolled in the Apple Developer Program.
  2. Add your Apple ID under Accounts in Xcode settings.
  3. Have an app record for your app in App Store Connect or have the required role or permission to create one.
  4. Have an Xcode project
  5. Your project needs to use source control, Github, Gitlab, or Bitbucket.

Setup Xcode:

Open the reports view from the Navigator or press ⌘ + 9 and in the reports view, switch to Cloud. then tap on Sign in… button.

or if you already signed in, the Get Started… button will shown.

After you tap on Get Started… , the Select a Product window will shown, You need to select your app in this window if you have multiple apps, and also you need to select an eligible account as your team.

Make sure that you already added your App ID to the Certificates, Identifiers & Profiles and create an app record in the App Store connect.

After pressing the Next button, the Review Workflow will show that it’s the default workflow, you can edit and customize it based on your needs. you can also change it later.

After you apply your customization to the workflow, press the Next button.

The Grant Access to Your Source Code will show, here you need to grant access to Xcode Cloud to your source control. for this story, I’m using Github, but it shouldn’t be so much different for other source control, unless you are using a self-hosted, in this case you need to make sure your Git server is accessible to Xcode Cloud. Check your firewall’s inbound HTTPS allow list and grant Xcode Cloud access to your Git server by adding the IP address ranges 17.58.0.0/18, 17.58.192.0/18, and 57.103.0.0/22. for more information, check Xcode Cloud documentation.

Tap on Grant Access… , It will open App Store Connect, probably you need to log in, and then this page will appear.

Tap on Complete Step 2 in Github , will open Github (or your SCM) and will ask you, where do you want to install the Xcode Cloud app. if you have multiple Organizations or accounts.

if not. you should see a page with the Xcode Cloud app description. and at the bottom of the page, is asking about Repository access permission. you can select all repositories or only one, based on your setup. and then press the Save button. you will redirected to the App Store Connect, and if you did everything correctly, you should see a successful screen.

Tap on Continue in Xcode. will change back to Xcode and you will see a green dot next to your repository. tap on the Next button.

You will see the Start Build screen, tap on Start build button and the build will be triggered. you can check the build stats in the report view.

Customize Workflow

Now you can edit the workflow and add some customization. right click on the default workflow and click on Edit workflow , this window will shown.

You can spend time planning next steps to refine your CI/CD process; for example:

  • Change your first workflow’s name and description.
  • Add a test action to your first workflow that runs your unit tests.
  • Change your first workflow’s start conditions to only start a build if you update a custom branch or add start conditions.
  • Add a post-action to distribute a new version of your app to testers with TestFlight.
  • Create additional workflows to perform advanced verifications that take more time to complete; for example, configure a workflow that runs your automated UI tests once per week.
  • Receive build information in Slack, a popular collaboration tool. For information about connecting Xcode Cloud to Slack, see Connecting Xcode Cloud to Slack.
  • Require an Xcode Cloud build to succeed before it’s possible to merge a PR. For more information, see Configuring requirements for merging a pull request.

or you can configure and create additional workflows or make changes to an existing one in Xcode:

  1. Navigate to the Cloud tab in the Report navigator.
  2. Control-click your app’s name or a workflow and choose Manage Workflows.
  3. In the Manage Workflows sheet, double-click a workflow to make changes to it or add a new workflow using the Add button (+).

Conclusion

Xcode Cloud is a game-changer for iOS developers, offering a powerful suite of tools to streamline the entire app development lifecycle. By leveraging its features for continuous integration, testing, collaboration, and deployment, developers can create high-quality iOS apps more efficiently than ever before.

Embrace Xcode Cloud to elevate your iOS app development workflow and bring your app ideas to life faster and more effectively!

For information on automating Xcode Cloud with the App Store Connect API, see Xcode Cloud Workflows and Builds.

For information on symbol information and crash reports, see Diagnosing issues using crash reports and device logs.

--

--

Saeid Rezaeisadrabadi
Saeid Rezaeisadrabadi

Written by Saeid Rezaeisadrabadi

Over 8 years of experience in iOS software development

No responses yet