Appcircle is a mobile CI/CD platform that provides a fully automated environment to build and deploy apps, which also supports fastlane for build automation.
With Appcircle, you can automate your build and signing processes with the flexible workflow structure and you can also use fastlane as a workflow step within the build workflows. To use fastlane, Appcircle expects the presence of a fastfile in your repository.
How Does Fastlane Work with Appcircle
fastlane is an automation tool for mobile app build and deployment and just as the name indicates, it provides a “fast lane” for mobile app projects by running the command line tools like xcodebuild. It can automate and simplify these processes and even though you can use it locally, it works best in tandem with CI/CD tools. It is especially popular with the traditional, general-purpose CI/CD tools that don’t support mobile app projects out of the box.
Mobile CI/CD tools like Appcircle can already automate the full mobile CI/CD process without the need for fastlane or any third-party tool. However, if you already have a project configured for Fastlane or if you have very specific dependencies on certain fastlane features, you can use it within Appcircle. With this way, you can actually enhance your fastlane flows with the advanced automation and workflow features of Appcircle. Moreover, you can use Appcircle Centralized Signing Identities or Appcircle Distribution or even the Appcircle In-Browser Emulator for your apps built with fastlane.
How to Use Fastlane in the Mobile CI/CD Workflow
Setting up fastlane with Appcircle is very easy. You just add fastlane as a step and you just need to have a fastfile present in your repository. Appcircle will take care of fastlane installation and automation.
The default actions are supported (such as fastlane gym, fastlane cocoapods, fastlane gradle for building iOS and Android apps, fastlane scan for testing apps, fastlane pilot and fastlane supply to send apps to App Store Connect (formerly iTunes Connect) and TestFlight, fastlane deliver to send apps to Google Play Store, etc.)
Appcircle supports different types of mobile app projects so that you can use fastlane iOS, fastlane Android, fastlane React Native and fastlane Flutter. You can opt in to use Appcircle counterparts of the fastlane actions as well. Appcircle workflow feature enables cherry-picking mobile CI/CD steps.
Creating a Build Profile to Connect Your Repository with a Fastfile
In Appcircle, a build profile contains the build workflows and the configuration of an app per target platform. (i.e. separate for iOS and Android).
- To create your first build profile, go to the “Build Module“. (The first item on the left menu) and click on the orange “Add New” button on the top right of the screen.
- In the next screen, enter a name for your build profile and select the target operating system (iOS or Android) and the target platform (Obj-C/Swift, Java/Kotlin, React Native and Flutter projects are supported). If you have two different targets in your project for iOS and Android, you need to create two separate profiles. This allows you to manage separate build workflows for different operating systems.
- Once created, click on the build profile to connect your repository that contains a fastfile. You can connect private and public repositories on GitHub, Bitbucket, GitLab and other compatible git providers. You can authorize Appcircle to connect to your cloud repository provider account. This will allow you to use auto-build your project with hooks.
- The build configuration has different flows for iOS and Android and the projects are configured on a branch basis. You can have different configurations for different branches and you can build any of your commits (assuming that they are compatible with the current configuration).
- You can use fastlane with the signing configuration defined in the lane or you can configure your build to use Appcircle centralized code signing as an alternative to fastlane match.
Adding fastlane to the Appcircle Build Workflow as a Step
A workflow in Appcircle is a ladder of steps taken to build your applications. Each step has a different purpose and the workflow can be customized by modifying step parameters and inputs, running custom scripts or re-ordering steps.
- To utilize fastlane in your builds, open the workflow editor and add the “fastlane” step after the “Git Clone” step.
- If you want to run a specific fastlane command, you can add a “Custom Script” step anywhere after the fastlane step.
- Once added, click on the fastlane step to configure it. Fastlane is easy to use with Appcircle just with two options.
- The “Fastlane Directory” option is used to specify the fastfile path . If you keep your fastfile in its default location, it is automatically used without the need to change this field.
- With the “Fastlane Lane” option, you can specify which lane to use.
- Once everything is set up, press Save to save your step configuration. Then you can configure and run your build just like any other app.
Appcircle also supports building and signing the app independently with the “Build” and “Sign” steps in the workflow. These steps can be used in parallel with fastlane.
Running the Build Workflow
To run the build workflow that includes the fastlane step, you can start a manual build or trigger an automatic build.
The full output of the fastlane execution can be viewed in the build log in real-time or after the build.
Deploying the fastlane Build Output
You can use fastlane to deploy the built apps to the supported third-party services or you can use the Appcircle Distribute module to share the app with the testers or send it to the public app stores.
For more information, screenshots, and support, please refer to the Appcircle documentation.
With Appcircle, you can automate the full lifecycle of your mobile app with continuous integration, continuous delivery and continuous testing.