Mobile app CI with AppCenter — good, but could be better

Christian Brevik
Jun 5 · 5 min read
Image for post
Image for post
Photo by roman pentin on Unsplash

AppCenter is one of Microsoft's offerings if you need a Continuous Integration (CI) solution for mobile apps. While Fastlane can probably be called the “industry standard” for mobile app CI software, AppCenter fills a certain niche which makes it a good option for certain use cases.

Fastlane is definitely a much more complete tool-belt than AppCenter. But, in order to qualify as being used in “CI”, it has to run somewhere other than locally on your computer. This means you have to configure both Fastlane, and an on-premise box or remote cloud infrastructure where it can run.

I like Fastlane and all of its bells, whistles and warts. But for beginners, and developers who want to do CI securely¹, Fastlane is quite a bit more complicated than AppCenter.

Compare it to AppCenter, where you pretty much only have to do two things in order to get started:

  • Create and choose the app type in the AppCenter dashboard
  • Connect the app in AppCenter to your git repository

After that you can create a build configuration which already has sane defaults. Things like incrementing the build number, environment secrets and signing the build “just works”. The app will build on new commits, and you have a functioning CI in place.

AppCenters niche

This is AppCenters niche. The ease and speed when getting started. This is true for setting up builds, and for many other features like testing or distribution. I’ve used AppCenter in multiple projects for different clients, where we needed to start building and distributing the app from day one.

Through the distribution channels, you have multiple ways of getting the app to early users. You can distribute the app directly to test groups within AppCenter. This means you don’t need to connect to the official channels, like TestFlight or Google Play. Which is a benefit since those channels have unpredictable review times the first time you submit the app. But you also have the option to distribute to different groups on those beta channels, or directly to the official store.

AppCenter also has a generous free plan, with (at the time of this writing) 240 build minutes each month per app, and unlimited distributions. A lot of the time, that’s all you’re going to need.

I would argue that AppCenter is likely the best solution for hobby projects, smaller teams, or even larger projects which doesn’t update frequently. And for some of those that do need to build often, the pricing is quite fair for unlimited builds.

Growing beyond the niche

I find that an often occurring cliche in development, is that tools which are easy to use, are also usually difficult to configure exactly how you want them. The same is true for AppCenter. Unless you follow the happy path, you will likely not stay happy.

As you scale any project up, the needs from your CI solution usually becomes more complex depending on the team members, cooperation between them, and the release processes. This is something our team also noticed recently while working on a new React Native-app for AtB, where we used AppCenter to get rolling quickly.

The problems started small, like wanting to generate app icons in the required sizes when building in our CI. While Fastlane supports this directly with a simple plugin, AppCenter only supports this indirectly through build scripts where you can script those tasks. Still, it’s just a simple script right? We quickly fixed that, and moved on.

Then bigger hurdles started showing up. For example, the team wanted different build configurations for our QA-builds and release-builds. The issue is that AppCenter build configs are linked to git branches — one branch equals one build config. You cannot have multiple build configs per branch. We solved this by having a dedicated branch for our release-builds, and more routines and processes for releases. But these are just band aids to compensate for a lack of functionality in AppCenter. And it’s unnecessary extra work at that.

While AppCenter has been good to us in an early phase of development, we see that we’re growing beyond the niche.

Other limitations

There are other limitations as well that we’d love to see AppCenter do something about.

Like with multiple build configs per branch, another thing we’d love to have is builds on pull requests and git tags. Our team uses pull requests (PR) and reviews for all new commits, and having the ability to build PRs before a merge would be very nice². We also tag all releases, and having the ability to build those automatically would simplify our release process. In many other CIs you can setup git branch filters, which can make builds flexible. What if you want a feature-branch build with its own dedicated distribution channel? These things would be a powerful feature in AppCenter, specifically because of its distribution solution.

Another issue with AppCenter is the manual process when handling certificates and provisioning profiles. If you want to do this securely, you should not include those files in your git repository along with the code. But the only secure option on AppCenter is manually uploading these files. If AppCenter had something like fastlane match, which was available to team members, and could automatically recreate expired or revoked certificates, that would be a huge improvement.

Other minor stuff, like automatically downloading bitcode dSYMs from Apple, or breadcrumb logging for AppCenter Diagnostics would be welcome as well. These are minor things, but stuff which works in Fastlane and other solutions. Anecdotally, we’ve also noticed that the builds on AppCenter have intermittently been unstable and slow, and have hampered our speed at times. But that might just be bad luck on our part.

Not a final goodbye

All in all, we are currently looking at other options for our mobile app CI needs.

But this is not a final goodbye. I will continue to use AppCenter for other apps where the scope of the project, and the needs of the team are met. Our team will also likely continue to use AppCenter for QA distribution as well, which works great, and for CodePush if we decide to move in that direction with our React Native-app.

Hopefully AppCenter will continue to improve, as times goes, because I really love how easy it is to get started. I just wish the tool-belt was more on par with Fastlane and other CIs — and that you could configure or extend different parts of the pipeline when you get past the early phase of an app. That would make it easier to grow projects within AppCenter.

¹ Like handling certificates, environment variables and distribution securely
² There are security concerns with building PRs in CI. If you build a PR from a forked repository, they could potentially expose secrets through modified build scripts. Although this could be mitigated by only allowing building PRs from the main repository.

Variant

Blogg for Variant

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store