Automate your mobile journey: iOS & Android CI/CD with Azure DevOps

Softweb Solutions Inc
Softweb Solutions Inc.
6 min readDec 27, 2023

Developing and deploying mobile applications can be a complex process. It often requires manual intervention and repetitive tasks. Azure DevOps, a powerful platform from Microsoft, offers a comprehensive CI/CD solution to streamline this process. It automates build, test, and deployment for both iOS and Android apps.

This blog post will guide you through setting up Azure DevOps pipelines for seamless mobile app CI/CD, leveraging its features to achieve efficient and automated delivery.

DevOps Basics

Prerequisites

· Azure DevOps account

· Github repository

Continuous integration (iOS)

· Open your project and navigate to “Pipelines” on the left panel

· Click on “Create Pipeline” which will open the page shown below:

· Choose a Github repository and select repository that you want to add for pipeline.

· Also select a branch from which you want to run the build.

· Select “XCode” from the list of templates and “Apply”.

· Here is the configuration with some of the basic settings.

· You can enable or disable task by right click on the individual task defined under “Agent job 1”.

· Create a distribution certificate and export it as a .p12 format.

· Create a distribution mobile provisioning profile.

· Add a password for the .p12 file in “Variable”.

· Add a mobile provisioning profile.

· Lastly, if you want to use pods in your project you need to add CocoaPods task in pipeline.

· If a project has all pods then you can skip this step.

· You can now save and queue your build by clicking “Save & queue” button.

· Make sure that Agent Specification is selected to macOS-xx.xx.

· These steps show how to add Azure Release pipeline to push the build to App Center.

· Select “Releases” under the “Pipelines” selection in the left panel.

· Create “New Pipeline”.

· Select empty job, there is no predefined template for uploading a build in app center.

· Enter the “Stage name” that you want.

· Now, select an Artifact which you want to upload. Artifact is created when an Azure build pipeline runs. So, in our case artifact is the one that is generated from the previous build steps.

· Click Add button in Artifact box and it will open new dialog.

· Select Source (build pipeline).

· Click on Add button to add.

· Once you finish, tap on “Save” button to save this configuration.

· The screen will look like the one shown below.

· Now select the lightning icon in artifact box.

· This will open a dialog and Enable Build switch.
If you want to trigger build on Pull Request then enable second switch to Save the setting again.

· Go to Pipelines and add a task “App Center distribute” task in “Agent Job 1”.

· Select “App Center Service connection” and add “Release note” and save configuration.

· You can manually add Release note, or you can choose a file to take a note from some file.

· Once you finish this task and pipeline runs successfully, and once you commit it will start creating build automatically for specific branch and share build via App Center to selected project.

Continuous integration (Android)

· Open your project and navigate to “Pipelines” on left panel.

· Click on “Create Pipeline” which will open below page.

· Choose a Github repository and select repository that you want to add for pipeline.

· Also select a branch from which you want to run the build.

· Select “Android” from the list of templates and “Apply”.

· Here is the configuration with some of the basic settings.

· You can enable and disable task by right clicking the individual task defined under “Agent job 1”.

· Next step is to setup a “gradle build” task.

· Select “gredlew assembleDebug” task.

· Select Gradle wrapper and set up configuration as shown in screenshot.

· Similarly, create an empty Job and create artifacts and save settings.

· Once you finish this task and pipeline runs successfully, and once you commit it will start creating build automatically for specific branch and share build via App Center to selected project.

Conclusion

By embracing Azure DevOps, you unlock a world of possibilities for your mobile app development. Continuous integration and delivery practices bring agility, speed, and reduced risk to your workflow. Whether you’re building for iOS or Android, these pipelines automate repetitive tasks, freeing you to focus on what matters most — crafting exceptional mobile experiences for your users.

Softweb Solutions has a team of DevOps experts who is well-versed in Azure DevOps and App Center. We are ready to help you design, implement, and optimize your CI/CD pipelines for maximum efficiency. From initial setup to ongoing maintenance, Softweb Solutions ensures your mobile app development thrives in the automation age. Contact us to unlock the full potential of Azure DevOps and deliver exceptional mobile apps, faster.

Author: Devesh Mevada

Co-author: Anshita Solanki

--

--