Fastlane — what it is, tools and mobile app build automation

Author: IT Sectr Published: 2026-04-14 Reading time: 10 min

Fastlane is an open-source tool for automating the build, testing and publishing of iOS and Android applications. Instead of manually running a dozen commands for signing, building and uploading to the store, the developer describes the entire process in a Fastfile and launches it with a single command. According to Fastlane Docs, 2025, the tool is used in more than 1.5 million projects worldwide. Fastlane combines utilities for working with App Store Connect, Google Play Console and code signing systems.

Key Takeaways

  • Fastlane — Open Source automation tool for iOS and Android builds and delivery
  • Actions — built-in commands for working with App Store, Google Play, signing and tests
  • Lanes — automation scenarios in Fastfile that combine a sequence of actions
  • Match — certificate and provisioning profile management system for iOS
  • Tools — scan (tests), gym (build), deliver (upload), snapshot (screenshots)

What is Fastlane and how it automates mobile builds

Fastlane is a mobile build automation tool written in Ruby and distributed under the MIT license. It automates routine mobile developer tasks: building the application, running tests, creating screenshots, signing code and uploading binaries to App Store or Google Play. Instead of 15–20 manual commands, the developer runs a single fastlane command with the scenario name.

Fastlane works as a wrapper over Xcode utilities (xcodebuild, xcrun) and Android SDK (gradlew, apksigner, bundletool), providing a unified interface for both platforms. This is especially valuable for teams that maintain iOS and Android versions of the same app — identical Fastfiles can describe builds for both platforms with minimal differences in parameters.

According to GitHub, Fastlane has over 39 thousand stars and is the automation standard in mobile development. The tool is supported by the community and Google — Fastlane is integrated into Firebase as the recommended way to deliver Android applications to Google Play Console.

Fastlane Architecture: Actions, Lanes and Tools

The Fastlane architecture is built on three levels: actions (basic commands), lanes (scenarios) and tools (specialized utilities). Actions are individual Fastlane functions, each of which performs a specific action: creating a screenshot, building an IPA, uploading to TestFlight. Lanes combine several actions into a sequential scenario described in a Fastfile.

Fastlane Actions

Actions are the building blocks of Fastlane. Each action takes parameters and performs one task. For example, the gym action builds an iOS application, scan runs tests, pilot uploads a build to TestFlight. In total, Fastlane has over 200 built-in actions, documentation for each is available via the command fastlane action [name].

If built-in actions are not enough, the developer can create a custom action in Ruby and connect it in Fastfile. Custom actions are distributed through Fastlane plugins, which are published in Rubygems and installed via the FastfilePlugin file in the project root.

Lanes and their Composition

A lane is a named automation scenario that combines several actions into a logical sequence. A lane can call other lanes (private lanes), pass parameters and handle errors. This allows building a hierarchy of scenarios: a base build lane, a deploy lane, a full CI/CD cycle lane.

Key Fastlane Tools: scan, gym, match, deliver

Fastlane includes a set of specialized tools, each solving a specific mobile automation task. Tools run as actions inside lanes or directly from the command line. Let’s look at four key tools covering the main CI/CD needs for iOS and Android.

ToolPurposeCommand
scanRunning Unit and UI tests on iOS simulatorfastlane scan
gymBuilding IPA or APP file for iOSfastlane gym
matchSyncing certificates and provisioning profiles via Gitfastlane match
deliverUploading binary and metadata to App Store Connectfastlane deliver
snapshotAutomatic screenshot generation on different devicesfastlane snapshot

Scan simplifies running Xcode tests, automatically selecting a suitable simulator and formatting the report. Gym builds the application with optimal compilation flags and supports exportOptions.plist for different build types (development, adhoc, appstore). Deliver allows uploading not only the binary but also screenshots, description, versions and prices through a single metadata file.

The Match tool deserves special attention — it solves the problem of storing and syncing iOS certificates in a team. Match encrypts and stores certificates and provisioning profiles in a Git repository, and developers get them automatically when running fastlane match. This eliminates manual setup on each workstation.

Snapshot: Screenshot Generation

Snapshot is a tool for automatically creating screenshots of a mobile application on different devices and languages. Snapshot runs UI tests on iOS simulators, taking screenshots at each test step. The results are saved to the fastlane/screenshots directory and can be uploaded to App Store Connect via deliver.

For Android, screengrab performs a similar function on Android emulators. Both tools support localization — screenshots are created for each language, simplifying the preparation of materials for publishing in multilingual app stores.

Setting up Fastlane for iOS Applications

For iOS projects, Fastlane is configured via Gemfile (installing the fastlane gem) and Fastfile in the fastlane directory. Initial setup is done with the command fastlane init, which creates the basic directory structure, requests App Store Connect data and generates a Fastfile template with basic lanes.

The key command for iOS is fastlane match, which must be run first to obtain certificates and provisioning profiles. After successful signing, Fastlane can build the application (gym), run tests (scan) and upload the binary (pilot or deliver).

ruby
# Fastfile for iOS app
default_platform(:ios)

lane :build do
  cocoapods
  scan(scheme: 'App', devices: ['iPhone 15'])
  gym(scheme: 'App', export_method: 'app-store')
end

lane :deploy do
  match(type: 'appstore')
  build
  pilot(skip_waiting_for_build_processing: true)
  slack(message: 'New version uploaded to TestFlight')
end

To work with TestFlight, use the pilot action — it uploads the IPA and manages testers. Fastlane supports upload_to_testflight (a synonym for pilot) and automatically handles waiting for Apple's build processing, which can take from 5 to 30 minutes.

Setting up Fastlane for Android Applications

For Android projects, Fastlane is configured similarly, but instead of Xcode tools, Gradle and Android SDK are used. Fastlane for Android supports building APK and AAB, signing via apksigner or jarsigner, running instrumented tests and uploading to Google Play Console via the Supply action.

The key difference is that Android build does not require certificate management via match (Android signing is managed via Keystore, which is stored separately). Fastlane for Android uses the gradle action to run any Gradle tasks and the supply action to work with Google Play.

ruby
# Fastfile for Android app
default_platform(:android)

lane :build do
  gradle(task: 'clean assembleRelease')
  gradle(task: 'testReleaseUnitTest')
end

lane :deploy do
  build
  supply(
    track: 'internal',
    aab: 'app/build/outputs/bundle/release/app-release.aab'
  )
end

To work with Google Play Console, a Google Cloud service account with access to the Google Play API is required. Fastlane accepts the JSON key of the service account via the SUPPLY_JSON_KEY environment variable or the json_key parameter in the supply action. The publication track can be internal, alpha, beta or production.

Integrating Fastlane with CI/CD Systems

Fastlane integrates with any CI/CD systems that can run Ruby scripts: Jenkins, Travis CI, GitHub Actions, GitLab CI, Bitrise and CircleCI. Integration comes down to installing the fastlane gem and running the command fastlane [lane_name] in the script stage of the pipeline.

For CI/CD, it is important to set up environment variables for storing sensitive data: MATCH_PASSWORD (certificate encryption password), FASTLANE_USER (Apple ID), FASTLANE_PASSWORD (Apple ID password). In Travis CI, variables are encrypted via travis encrypt, in GitHub Actions — via Secrets repository.

The recommended practice is to use fastlane match in CI/CD with the readonly flag to prevent accidental changes to the certificate repository. For Android, use a Base64-encoded Keystore stored in an environment variable, which is decoded and saved to a temporary file during the before_install stage.

Fastlane Match: Certificate and Profile Management

Fastlane Match is a tool for automating iOS certificate and provisioning profile management, one of the most valuable Fastlane features for teams. Match creates an encrypted Git repository (or uses an existing one) that stores all certificates and profiles, synchronizing them between developers and CI/CD servers.

Match supports five profile types: development, adhoc, appstore, enterprise and developer_id. Each type is stored in a separate directory inside the repository. The command fastlane match development installs development certificates on the local machine, while fastlane match appstore installs App Store profiles for CI builds.

ruby
# Using Match in Fastfile
lane :setup_signing do
  match(
    type: 'appstore',
    readonly: true,
    git_branch: 'main'
  )
end

lane :update_profiles do
  match(
    type: 'development',
    force: true,
    app_identifier: ['com.example.app', 'com.example.app.watchkitapp']
  )
end

Match security is ensured by encrypting all files before committing to Git. The encryption password is set via the MATCH_PASSWORD environment variable and must be the same for all team members. Match uses OpenSSL for encryption and does not store the password in plain text in the repository.

Frequently Asked Questions

What is Fastlane in mobile development?

Fastlane is an Open Source automation tool for iOS and Android applications. It automates building, testing, code signing and delivery to App Store and Google Play through a single Fastfile configuration file and a set of built-in tools.

What tools are included in Fastlane?

The main Fastlane tools: scan (tests), gym (iOS build), match (certificates), deliver (App Store), pilot (TestFlight), snapshot (screenshots), supply (Google Play) and frameit (screenshot frames). Each tool is available as an action inside a lane or from the command line.

How to set up Fastlane for an iOS application?

Install gem fastlane, run fastlane init in the project root. Configure Fastfile with lanes for building (gym) and testing (scan). Set up Match for certificate management via a Git repository. Add a deploy lane with pilot or deliver for uploading to App Store Connect.

How to set up Fastlane for an Android application?

Run fastlane init specifying the package name. Use the gradle action to run Gradle tasks (assembleRelease, testReleaseUnitTest). Configure Keystore via environment variables. Use the supply action to upload AAB or APK to Google Play Console on the desired track.

How to integrate Fastlane with CI/CD systems?

Install gem fastlane on the CI/CD server and add the command fastlane [lane_name] to the script stage of the pipeline. Configure the FASTLANE_USER, FASTLANE_PASSWORD and MATCH_PASSWORD environment variables in the CI/CD secret variables. Use match readonly for CI to avoid accidental certificate changes.

Summary

  • Fastlane — Open Source mobile build automation tool with iOS and Android support
  • Actions — basic commands for building, testing, signing and delivery (over 200 built-in)
  • Lanes — scenarios in Fastfile combining multiple actions into a sequential CI/CD process
  • Match — iOS certificate management system via encrypted Git repository
  • iOS setup includes scan for tests, gym for building, pilot for TestFlight
  • Android setup includes gradle for building and supply for Google Play
  • Fastlane integrates with Jenkins, Travis CI, GitHub Actions and other CI/CD platforms

We will develop a mobile application turnkey

IT Sectr creates iOS and Android applications for startups and businesses since 2017. We will advise you and propose the best solution.

Discuss the project

Read also