Ionic Launch Event. September 28th 2021.
Every serious app will utilize a CI/CD process for continuous testing, integration, and delivery.
Unfortunately, Mobile presents unique CI/CD challenges, and the same techniques that web developers use for frontend CI/CD won’t apply for mobile, since build and deployment processes are radically different.
The first step for CI/CD for a Capacitor app is using a process for building and testing your frontend JS app.
This is commonly done today using a generic CI/CD service like GitHub Actions, CircleCI, Jenkins, etc.
In this process, an app is set to build on each commit and often run a local test suite. This is the typical JS CI/CD process and your team is likely already familiar with it.
But this is just the tip of the iceberg, as teams will need to figure out how to build, test, and deploy the actual native mobile side of their app.
Just building and running JS app tests is not nearly enough for a mobile app, given that a big portion of your app needs to build and run as a native iOS and Android app.
Additionally, the way a mobile app is deployed and updated is very different from a web app. Whereas a web app will be hosted on a server that can be quickly updated, mobile apps are “hosted” in app stores and distributed as cryptographically-signed binaries. The update process is very different.
This means we need a service that can do native mobile builds and tests, and also offer a way to deploy and update our apps in a native mobile appropriate way.
One such service that provides end-to-end Mobile CI/CD is Appflow, the official Mobile CI/CD and Mobile DevOps platform for Capacitor apps.
Appflow provides frequently updated, managed iOS and Android build environments. Appflow integrates with popular git services like GitLab, GitHub, and Bitbucket, to support triggering JS and native mobile builds on each commit. Appflow also supports separating builds into different channels for stakeholders, beta testers, and production users.
For Capacitor developers, Appflow also offers the ability to push real-time updates to apps without app store submission, as long as those updates are at the JS/HTML/CSS layer of an app.
For more details, see the Appflow Documentation.
Appflow can replace a traditional CI/CD service since it performs web/JS builds and native mobile builds. However, it works great with a traditional CI/CD service.
To use it in this way, use webhooks to send built assets to Appflow on each commit.
There are other services for Mobile CI/CD, though none focused on Capacitor. Some of those options include Visual Studio App Center, Bitrise, and Buddybuild (iOS only). Keep in mind none of these services currently provide remote real-time app updates for Capacitor apps.