Dev Genius

Coding, Tutorials, News, UX, UI and much more related to development

Follow publication

Xcode Cloud: Automated Workflows

Batikan Sosun
Dev Genius
Published in
6 min readNov 22, 2021

--

Build, test, and distribute your apps with Xcode Cloud. All in one.

TABLE OF CONTENTS

  • What is the Xcode Cloud?
  • What are the requirements for using Xcode Cloud?
  • Which source code management(SCM) works with Xcode Cloud?
  • How can I set up Xcode Cloud for my projects?
  • Can I deliver the artifacts on the other platforms?
  • Can I use custom scripts with Xcode Cloud?
  • Are we need Xcode Cloud for continuous integration and continuous delivery?

What is the Xcode Cloud?

Apple has recently been announced the Xcode Cloud as a part of Xcode 13 in WWDC 2021. WWDC21: Meet Xcode Cloud,

This means that Apple has introduced its own CI/CD tools to compete with some other tools on the market, including Jenkins, TeamCity, CircleCI, Azure DevOps, and Github Actions.

Xcode Cloud is a cloud-based continuous integration and delivery service constructed into Xcode and designed for Apple developers. While using Xcode Cloud, your first aim is to continue the cycle of CI/CD service.

Apple

Xcode Cloud lets you utilize continuous integration and delivery (CI/CD), a standard software development practice that helps you develop and maintain your code and deliver apps to testers, teams, and users.

Xcode Cloud is a CI/CD system that connects the tools you use to create software and frameworks for Apple platforms: Xcode, TestFlight, and App Store Connect.

With Xcode Cloud you can:

  • Build your project
  • Run tests
  • Deliver builds to testers

After successfully all of the above processes, you can immediately release your apps.

Apple

What are the requirements for using Xcode Cloud?

Xcode Cloud comes with Xcode 13 which means Xcode Cloud is a part of Xcode 13 and that currently in Beta.

Before configuring your project or workspace to use Xcode Cloud you need an account, project, and source control requirements.

You must use Xcode’s new build system, see Build System Release Notes for Xcode 10.

You must use automatic code signing, see Code Signing.

You need to visit Xcode Cloud Beta to submit an access request if you have an Apple Developer Program.

You can begin to use Xcode Cloud when your account has been eligible.

Which source code management(SCM) works with Xcode Cloud?

To use Xcode Cloud you need to use Git for source control. As you know, Xcode does not support another VCS like Subversion(SVN).

To learn more about using source control with Git in Xcode, see Coordinating and Syncing Code Changes.

Xcode Cloud supports the following source code management (SCM):

  • Github and Github Enterprise
  • Bitbucket Cloud and Bitbucket Server
  • Gitlab and self-managed Gitlab instances

How can I set up Xcode Cloud for my projects?

You can access the Xcode Cloud menu in two ways:
Product -> Xcode Cloud as showed up below screenshot.

Second way follow left Side Bar -> Report Navigator showed up below screenshot.

At this point, I will show you screenshots of how can we configure a workflow step by step.

Xcode Cloud -> Create Workflow then you will see the Select a Product and then select the product and click Next button.
After the Next button selection, you will see the Review Workflow box. You can edit the workflow with the Edit Workflow button after and then select the Next button and then you will see the Grant Access to Your Source Project dialog box. This point is important to continuing the cloud-based CI/CD service. You need to click the Grant Access button and allow permission access to the repository.

Apple will access your code to build your project, store recently built artifacts, associated SCM metadata, and display this information in Xcode and App Store Connect. You can revoke access at any time.

Xcode will redirect you to the App Store Connect account and after signing in with the account credential you need to complete the step by Github Authorize Xcode Cloud. When you click the Complete step 1 in Github, you will be redirected to Github Authorize Xcode Cloud and then click the Authorize Xcode Cloud. After all of the processes, you will see the below screenshot.

Back to Xcode and click the Next button in the Grant Access dialog box. After this action, If you haven’t set up in the App Store yet, you will see the Create App On the App Store Connect dialog box. Set the SKU and primary language and complete the workflow.

You can edit the workflow settings with Product -> Xcode Cloud -> Manage Workflow. The workflows will be listed and then select a workflow and then click the setting button from the bottom of the dialog box.

The general section of the selected workflow will open.

You can name the workflow with a Name text field and you have one more field to additional description with the Description field.

With listening a branch changes, a build can be started automatically.
On the Type field, you can configure changes on a branch as you wish. And below type you will see the Source Branch field: you can set custom branch.

On the left side, you can set the environment with the Environment menu. Xcode version, macOS version, etc.

Also, on the left side, you will see the Actions and Post-Actions menu.
Actions menu provides to add Build, Test, Analyze and Archive options. To start workflow you must add at least one.

lso, Post-Actions provides a few good actions which are Notify, Testflight External Testing, and Testflight Internal Testing.

After all of these configurations, you can start to build by branch listening or start manually by right click to any workflow and then selecting the Start Build.

Can I deliver the artifacts on the other platforms?

Xcode Cloud has strict rules that only deliver artifacts in Testflight.

Are we need Xcode Cloud for continuous integration and continuous delivery?

Apple has joined this trend by serving continuous integration bundled with Xcode, TestFlight, and App Store Connect. This way provides a native solution without using 3. party tools. It saves you from dealing with other tools in terms of both time and resources.

Also, Xcode Cloud is still in beta, and we can’t say for sure to use it. The fee is still unknown. According to Apple: More details on pricing and availability of Xcode Cloud will be announced this fall.

Thanks for reading.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Published in Dev Genius

Coding, Tutorials, News, UX, UI and much more related to development

Written by Batikan Sosun

Tweeting tips and tricks about #swift #xcode #apple Twitter @batikansosun Weekly Swift Blogging

No responses yet

Write a response