Bitrise CI/CD for iOS (and mobile) developers

The aim of this post is just present Bitrise a CI/CD platform that will allow you to deliver (and deploy)  your ongoing app to other team members, mainly QAs and POs.

Through this post you will see how easy is to setup a xcode adhoc project and how to distribute it.

Problematic

For driving a mobile project to a good end, is necessary but not enough being a good mobile developer (iOS, Android, web-mobile…). After some years of bad and good projects I reached to the conclusion that is necessary also a good methodology (scrum), customers with clear ideas, all team members focused on their tasks and a good coutinuous integration and delivery system.

As a mobile developers, is hard to focus at the same time the app project and tune properly a CI/CD system.

Bitrise CI/CD for iOS developers is an alternative to classic platforms such as Jenkins, Travis,… that does not require a dedicate devops engineer to handle it.

What is Bitrise

This tool is a continuous integration platform oriented to mobile developers. Is very easy to setup, it took me a few hours ⏱️. It also offers a free tier that lets you start to play with it.

Hands on

I have uploaded in github a sample single view app xcode project.

☝️The unique thing to keep in mind up to now is just be shure that project schema is shared, other wise bitrise validation will fail 🤷.

XCode - Manage Schemes

XCode, set shared schema

Be sure that app is deployable on device with cable….

Configuration

☝️Before continuing, I have to advise you that is mandatory having Apple Developer account 💲for generating a developer certifiate .p12 and the provisioning profile for deploying on a iPhone device.

Firsrt of all, create your free account  and setup your first a new app. Fill the repository url and the branch. Bitrise will validate if all is ok with the project.

Bitrise, setup app project

Once validation is ok:

Bitrise, setup xcode adhoc distribution

For the purpose of this article we will just proceed with ad-hoc distribution.

Bitrise, xcode app adhoc distribution

Last but not least!!! 😂😂😂 Now is time to provide the certificate (.p12) and the adhoc .provisioning profile.

Bitrise CI/CD for iOS - Bitrise, set ios certificate and provisioning profile

Be sure that signing is properly configured in the project, uncheck ‘Automatic manage signing’ and import the generated provisioning profiles.

Xcode set provisioning profile

Getting back to work flow configuration, select deploy workflow and define $email variable with the email list of the persons that you want to distribute the app.

Bitrise CI/CD for iOS - Bitrise set email destination

… and save

Save bitrise workflow changes

With those simple steps we are able to launch the first workflow:

Bitrise CI/CD for iOS - Launch bitrise workflow

Once finish you will receive an email, with an invitation to deploy the app in the device. Look out! the first time  you will have to install the profile:

Bitrise CI/CD for iOS - Approve bitrise profile on device

And finally open the email and install the app.

Bitrise CI/CD for iOS - Bitrise email invitation to install appBitrise CI/CD for iOS - Deployoing app from bitrise Bitrise CI/CD for iOS - Deployed bitrise app running on device

Conclusions

The point in using Bitrise CI/CD for iOS (and mobile),  is that allows developers to focus on his main goal, all in all, reach PO and QA expectations. Ideal for very small t that want to carry their app to a god destination.

 

Referneces

Other

Other iOS development posts