xcode

An announcement that was a sigh of relief and brought smile on every face present at WWDC 2017, was a session on ‘What’s New in Signing for Xcode and Xcode Server’. Similarly, it was great for us, the iOS developers at Let’s Nurture, a leading iOS application development company, Ahmedabad and many others around the world. The iOS developers used third party CI services TravisCI, self hosted solutions like Jenkins or Ruby tools like Fastlane for Continuous integration before Xcode Server.

Why Xcode Server with Xcode 9?

Apple introduced a base for Continuous Integration Xcode 8, wherein iOS developers had to setup up an OSX server app or macOS Server app, integrate Xcode service with the macOS server app and then create Xcode bots for Continuous Integration. But, using Xcode Server with macOS application and Xcode Service was still a battle with code signing and parallel execution.

With Xcode 9 all of this is history. All the chaos has been lost with this upgrade of Xcode, now it’s much more easier and efficient as well.

  • The first and foremost advantage is that you don’t need a seperate macOS Server application.
  • Xcode Server bot can manage code signing and parallel testing with automatic provisioning of devices on multiple devices and simulators with the help of new tabs introduced in server bot.
  • Both development and distribution signing is now possible with automatic signing.
  • Distribution IPA is created by Xcode server via automated or manual signing.

How to setup Xcode Server?

Xcode Server can be setup using local Mac or another Mac, simply by selecting the Mac and Integration user. To understand the process of enabling Xcode Server please have a look at the GIF below.

setup xcode server

Xcode Bot Creation for iOS Applications

A bot can be created from Xcode by going into the Product tab -> Create Bot and name the bot as suits you. Then add GitHub Repository to the bot, with SSH for which you’ll be asked to trust the identity repository by Xcode. You just have to select “Trust” and use credential of existing SSH key. Once the authorisation is done successfully, the build should be able for configuration.

 

Configuration of the build is the most crucial stage where we can configure the things we want to execute as part of the build, the main parts are as follows:

  • Scheme
  • Analyse, Test, Archive
  • Configurations

This is what a bot configuration screen should like, you can set the scheme and choose the actions to be performed according to your requirements.

 

bot creation

 

Scheduling the bot integration is the next step, which you can set according to your necessity.

code signing

 

Code signing can be added to our bot, and that is the next step. We can either let Xcode server to do everything for us by giving access to Xcode Server or opt for manual signing where we have to choose certificate from server machine.

code provisioning

 

Parallel Testing is possible with bots, i.e., we can enable parallel execution on multiple simulator by selecting the devices for testing and checking the “Run tests in parallel”.

parallel testing

 

Bot triggers be added to the bot as well, through which you can notify yourselves and many others working on that iOS application on the success or failure of bot integration via email. In this email, you’ll find the success or failure message, server information, number of issues and listing of the commits done. There shall also be a link to download the integration logs or open it in Xcode.

bot triggers

 

Integration Result is a whole mix of the things listed below:

  • integration summary
  • test reports
  • code coverage
  • commit information
  • integration logs

which looks like the image shown below.

integration result

You can download the IPA to create the build of an iOS application from here directly. Or you can download the whole Integration Log which contains the IPA along with many other things like buildService log, xcodebuild log, xarchive data and much more from the log tab or the email received via the bot trigger.

 

Wrapping up Continuous Integration with Xcode Server

There’s one thing that Continuous Integration with Xcode Server doesn’t support, testing Pull requests and the only task Xcode Server has left for iOS developers to do is to upload the IPA to iTunes Connect, Diawi or TestFlight.

 

But, apart from these, by introducing Xcode Server, Apple has relieved us by helping us achieve continuous delivery in mere number of clicks and the best part is that we don’t need to manage CI servers or write build scripts.

 

How Let’s Nurture helps in Continuous Integration with Xcode Server?

Let’s Nurture, a leading IT company known for custom mobile app development in India has got the expertise in providing many solutions based on iOS app development, using features like Continuous Integration with Xcode Server which helps save time and provide easier build delivery of iOS application. We at Let’s Nurture can provide solutions for people, interested in making iOS applications using various frameworks, technologies and features like Continuous Integration with Xcode server.

If you want to know more about Continuous Integration, Xcode Server and iOS app development or want to implement this technology in your existing iOS app with Xcode, get a free consultation from our experts at Let’s Nurture in order to hire mobile(iOS/Android) app developers at affordable price.

Want to work with us? We're hiring!