Continuous Integration (CI) and Continuous Deployment (CD) are integral practices for adopting Agile methodology and DevOps that help foster the Time-To-Market and Time-to-Delivery. To facilitate practices of CI and CD while developing mobile apps, Microsoft introduced a cloud platform named Visual Studio App Center that manages the complete Mobile Application Development Lifecycle.
Traditionally companies were shipping new app releases on a monthly or quarterly basis. But recently, the trend has changed to several app updates on a weekly or daily basis. The main reason being to remain ahead of other competitors by rolling out the latest features constantly, and being in an error-free state most of the time by pushing bug fixes, adapting to the latest OS versions, etc.
The manual effort to test, sign, update version numbers and send new builds to the App Store and the Google Play Store is a lot, especially when multiple builds are being generated per day. The question that arises is, “How do we automate this process?”. The answer is by implementing Mobile DevOps with Continuous Integration, Continuous Delivery and Continuous Deployment.
Continuous integration combines the work of multiple developers and is usually done to finish multiple features and fix bugs simultaneously, in an iterative fashion. Continuous Delivery is a methodology that builds apps so they are ready whenever a release is required at any point in time. Continuous Deployment is an automation process that instantly deploys the changes you make, to Google Play Store, Apple App Store etc. or to a group of testers through a pipeline.
Visual Studio App Center brings together multiple services commonly used by mobile developers. App Center can be used for multiple services to build, test and deploy applications, usage and crash data analytics, push notifications, user authentication, and data synchronization. Visual Studio App Center can be used with many mobile app development technologies. Here is a list of Technologies that App Center currently supports:
Figure: Depicting list of technologies supported by App Center
App Center supports multiple source control providers (VSTS, Github and Bitbucket). Once a repository is connected from any of these providers, a branch from the repository is to be selected as the source for the build process.
Figure: Depicting various Source Control Provider options in App Center, to implement CI
Figure: Depicting a branch from a Github repository being selected as a source for the build process.
Build configuration depends on the technology and OS platform combination. For iOS applications, we will need to specify details like iOS SDK version, Xcode version, provisioning profile, signing certificate etc. Whereas for Android required information would be Android SDK version number, Keystore details for signing etc.
We can also mention how the Build Number (unique number referring to each build that is incremental in nature indicating an update in the App Store) needs to be updated in this step. We can either choose "Build ID" which would be a plain whole number that gets incremented in each build (value will be 1 for the first build) or the current Time Stamp. Both of these options would result in new builds being created with higher build numbers than before. The build number is not to be confused with the application version number which appears in App Store/Play Store.
Figure: Depicting build configurations available for iOS applications.
Figure: Depicting Build Signing Configurations available for iOS
Figure: Depicting Build Signing Configurations available for iOS applications.
Distribution can be done either to an internal testing group or to Appstore/Play Store depending on the distribution strategy. In the “Distribute” section of the menu, “Groups” needs to be selected to create a Distribution Group of internal testers. Alternatively, App Store or Play Store accounts can be connected from the “Stores” menu.
Figure: Depicting various distributions channels available in App Center for CD
Once a distribution group is created or a store account is connected, we can trigger a release manually from the portal or configure it to distribute automatically on every successful build (in the “Distribute” section of build definition) as depicted below.
Figure: Depicting configuration of Continuous Distribution
One of the major advantages of choosing Visual Studio App Center over other common providers for CI/CD is that apart from automated build and deployment systems it also provides a bouquet of other services like Crash Analytics, App Usage Analytics, Push Notification Service, and more. This makes Visual Studio App Center a one-stop-shop for all mobile application development requirements. The ease of use that comes with the intuitive UI of the management console and the feature richness make the Visual Studio App Center the first choice for many mobile app developers.
Sreeraj P R works as Sr. Software Engineer at V-Soft Digital and has over 6 years of experience in the IT industry. He has profound expertise in Mobile Application development for Android and iOS using Xamarin. He also has experience in web technologies like ASP.Net.