Demystifying Xcode Cloud

Margaryta Chepiga
Loblaw Digital
5 min readNov 18, 2021

--

Prior to writing this article, I decided to search Xcode Cloud articles online to see what other people had already written about it. What I saw surprised me, but not in a good way.

As a person who had the privilege to try Xcode Cloud Beta myself, I want to showcase information that is not yet present online. I want to share the perspective of the person who got a taste of Xcode Cloud Beta. Let’s get started!

What is Xcode Cloud?

Xcode Cloud is a continuous integration and delivery (CI/CD) service for automating the process of building, testing, analyzing and releasing your applications that uses Git for source control.

What Xcode Cloud brings to the table that other CI/CD platforms don’t?

To provide you with a bit of insight into things we do at Loblaw Digital. This year we (the PREM team) assessed six different build platforms that provide CI/CD services. I’ve personally completed trials on four of them (including the one we are currently using). With that in mind, let’s discover together what Xcode Cloud offers that other platforms don’t.

One Application for Everything

At the beginning of this article, I mentioned that Xcode Cloud uses Git for source control. I didn’t have to say it in my explanation of what Xcode Cloud is, but I did it on purpose. You see, the way Xcode Cloud is integrated with SCM (source code management) and Xcode IDE is beautiful. Essentially, your CI/CD is located in your desktop Xcode application, including partial functionality that you would get from your source code management provider.

What does this mean?

It means that now there is no reason for you to leave your Xcode app to go to your source code provider (like Github) to check the status of your pipeline. It means that you can create, review, commit on your MR within your Xcode app.

If you think about it, Xcode Cloud not only replaces your CI/CD platform of choice (like Bitrise) but also replaces the need to switch back and forth to your SCM provider (like Gitlab).

At the same time, I heard that to some people it seems like the desktop app (Xcode) is the only place where you can configure your workflows. This is not true; Xcode Cloud is also available on App Store Connect. As long as your app is onboarded to Xcode Cloud, you can manage your workflows, trigger manual builds, view and download logs, test results and artifacts from your browser by using the App Store Connect Xcode Cloud Dashboard.

Easy to Set Up

On the topic of onboarding, out of all the build platforms I’ve ever tried, Xcode Cloud so far provides the most straightforward setup. Connecting your repository, even for the very first time, is a self-explanatory process.

I have to mention, though, that in order to make sure that the process of onboarding your project to Xcode Cloud is easy, you need to comply with Xcode Cloud’s requirements. I have to admit that there are quite a few of them. However, the requirements are not as complex as people seem to think.

While we are on the topic of Xcode Cloud’s requirements, I think it makes sense to answer one crucial question regarding Xcode Cloud’s requirements — automatic code signing.

Automatic Code Signing

The most controversial requirement seems to be the usage of automatic code signing. This is understandable; not everyone is using automatic code signing in their apps. At Loblaw Digital, we currently use manual code signing for all of our apps, and manage our provisioning profiles and certificates using Fastlane match. Hence, Xcode Cloud’s requirement of using automatic code signing was essential for us to decouple.

During the Xcode Cloud trial, we found out that in order to build, test, and analyze your codebase, you don’t need to have automatic code signing enabled. Furthermore, you don’t have to enable automatic code signing during an archive action, as long as you are not deploying your app to TestFlight or App Store.

This is all great, Margaret, but do I need to know CI/CD to use Xcode Cloud?

Honestly, in my personal opinion, I think that you don’t really need to know much about CI/CD to use Xcode Cloud, which I think is one of the great benefits of Xcode Cloud. Xcode Cloud doesn’t have a big learning curve, and it’s tough to break. Workflows are designed in a way to be highly intuitive and pretty self-explanatory. Of course, in the long run, it is crucial to invest in learning CI/CD and its best practices. So that we know how to answer questions like “How do we create the most efficient workflow strategy?”. But at the end of the day, any developer can create a CI/CD using Xcode Cloud without any prior knowledge on it.

With that said, as we all are well aware, coins are double-sided. Unfortunately, Xcode Cloud is not all about rainbows and butterflies; nothing really is. When it comes to the last point that I made, it’s worth adding that the simplicity of Xcode Cloud comes at a price: Xcode Cloud Beta does not offer much customization. Xcode Cloud indeed provides functionality to include custom build scripts that could be executed at different pipeline stages. But if you’re used to other CI/CD build platforms and use a lot of customization, this might be an issue for you.

While we are on the topic of two sides of a coin, I feel like it makes sense for us to look into Parallel Execution on Xcode Cloud.

Parallel Testing

This point might not be unique in terms of parallel testing execution. Still, not only does Xcode Cloud execute your tests in parallel, but your actions are executed in parallel as well. To be honest, the notion of performing actions (jobs) only in parallel is relatively new to me, as we are simply not used to this approach. Depending on the use case, we could run our jobs sequentially, in parallel, some of the jobs in the same workflows could run sequentially, and some in parallel. However, with Xcode Cloud, we could only run our actions in parallel, there is no option to execute your actions sequentially. This means that if we were to adopt Xcode Cloud, we would need to invest time to develop a workflow strategy and change our mindset from being used to running actions sequentially and in parallel to running actions in parallel only. Essentially, it’s not as easy as copy and pasting your current approach.

Final Thoughts

This is all I have for you today. I’m curious to know what you find interesting in this blog post? What was the thing that surprised you the most? Are you excited about Xcode Cloud? Would you like to try it yourself? Do you think it would suit your teams’ needs? Was there something about Xcode Cloud that disappointed you? Please share with me in the comments!

Thanks to Avery Roswell and Azadeh Bagheri.

--

--

Margaryta Chepiga
Loblaw Digital

Software Developer, known as overexcited girl who is passionate about technology