Appcircle Integration
Appcircle is a mobile CI/CD platform for building, testing, signing and distributing iOS and Android apps. It is available as Appcircle Cloud or as a self-hosted installation.
You can use fastlane with Appcircle in two ways:
- Run your lanes on Appcircle: add the Fastlane step to an Appcircle build workflow.
- Send builds to Appcircle from any CI: use the Appcircle fastlane plugins to upload binaries to Testing Distribution, the Enterprise App Store or Publish to Stores from your lanes, wherever they run.
Running fastlane on Appcircle
Creating a Build Profile
In Appcircle, a build profile holds the repository connection, workflows, configurations and triggers of an app for one target OS. Create a separate profile for iOS and for Android.
- Open the Build module and click New profile.
- Enter a name, then select the target OS (iOS or Android) and the target platform (Objective-C/Swift, Java/Kotlin, React Native or Flutter).
- Connect the repository that contains your
fastlanefolder. You can connect to GitHub, GitLab, Bitbucket and Azure DevOps, or use any Git server via SSH or a public URL. See connection guides for details.
Adding the Fastlane Step to a Workflow
A workflow is an ordered list of steps that runs on the build machine. A build profile can have several workflows, for example one for pull requests and one for releases.
- In the build profile, click Workflows, select a workflow (or create one with New) and click Manage Workflow.
- Drag the Fastlane step from the Workflow Marketplace and drop it after the Git Clone step. The step needs the cloned project files to run.
- Click the step and configure its inputs:
- Fastlane Directory (
AC_FASTLANE_DIR): the directory that contains yourfastlanefolder andGemfile. Defaults to$AC_REPOSITORY_DIR, the root of the cloned repository, so only change it if fastlane lives in a subdirectory (for example a React Native or Flutter project'siosfolder). - Fastlane lane (AC_FASTLANE_LANE): the lane to run, including the platform if you use one, for exampleios betaorandroid deploy. - Click Save.
If a Gemfile exists in the fastlane directory, the step runs bundle install and then bundle exec fastlane <lane>, so the fastlane version and plugins from your Gemfile and Pluginfile are used. Without a Gemfile, the step installs the latest fastlane release. Committing a Gemfile and Gemfile.lock is recommended (see Setting up fastlane).
The step's source code is available on GitHub.
Environment Variables and Secrets
Store credentials such as MATCH_PASSWORD, an App Store Connect API key or a Google Play service account JSON in an environment variable group, mark sensitive values as secret, and select the group in the build profile configuration. Your lanes can read these values with ENV["NAME"].
Appcircle also provides built-in variables such as AC_REPOSITORY_DIR, AC_OUTPUT_DIR, AC_GIT_BRANCH, AC_BUILD_NUMBER and AC_TRIGGER_REASON that you can use in your lanes.
Code Signing
You can sign your app in your lanes, for example with match or by providing certificates and provisioning profiles yourself.
As an alternative, you can store certificates, provisioning profiles and Android keystores in Appcircle's Signing Identities module, select them in the build profile configuration, and let Appcircle's build and sign steps handle signing. These steps can be used alongside the Fastlane step in the same workflow.
Exporting Build Artifacts
Appcircle only keeps the files that are in $AC_OUTPUT_DIR when the Export Build Artifacts step runs. To see your fastlane output in the build artifacts, or to send it to other Appcircle modules, write it to that directory and make sure Export Build Artifacts comes after the Fastlane step:
lane :beta do
build_app(
scheme: "MyApp",
output_directory: ENV["AC_OUTPUT_DIR"]
)
end
Running the Build
Start a manual build or set up triggers. Click Triggers in the build profile to run a workflow and configuration automatically on every push, on pull/merge requests, on tag pushes or on a schedule.
The full fastlane output is shown in the build log in real time and stays available after the build.
Distributing Builds with the Appcircle Plugins
Appcircle provides fastlane plugins that upload builds from your lanes. They work in any environment, including Appcircle itself, other CI services and local machines.
| Plugin | Action | Purpose |
|---|---|---|
appcircle_testing_distribution |
appcircle_testing_distribution |
Share builds with testers and testing groups. |
appcircle_enterprise_app_store |
appcircle_enterprise_app_store |
Publish in-house apps to the Enterprise App Store. |
appcircle_publish |
appcircle_publish |
Upload to a Publish to Stores profile and trigger its publish flow to the App Store, Google Play, Huawei AppGallery or Microsoft Intune. |
Add a plugin to your project with:
fastlane add_plugin appcircle_testing_distribution
All plugins authenticate with an Appcircle Personal Access Key (previously called Personal API Token). Generate one under Organization > Security > Personal access key in Appcircle and store it as a secret, for example in AC_PERSONAL_API_TOKEN.
lane :distribute do
build_app(scheme: "MyApp")
appcircle_testing_distribution(
personalAPIToken: ENV["AC_PERSONAL_API_TOKEN"],
profileName: "MyApp Beta",
createProfileIfNotExists: true,
appPath: lane_context[SharedValues::IPA_OUTPUT_PATH],
message: "New beta build"
)
end
If you use a self-hosted Appcircle installation, pass your own authEndpoint and apiEndpoint to the actions. See each plugin's README for all parameters, or run fastlane action <action_name>.
If you build on Appcircle, you can also send signed builds to Testing Distribution, Publish to Stores or the Enterprise App Store from the Distribution tab of the build profile configuration, without using the plugins.
Further Documentation
For more information, see the Appcircle documentation, in particular the Fastlane workflow step and the Appcircle fastlane plugins.