fastlane

On this page 7

fastlane is an open-source automation toolkit that scripts the repetitive release work of mobile app development: building binaries, managing code signing, running tests, capturing screenshots and uploading builds to App Store Connect and Google Play. Written in Ruby and driven by a configuration file called the Fastfile, it turns a release that once took an afternoon of manual clicks into a single repeatable command.

Within the Mobile field, fastlane sits between the native toolchains, such as Xcode and Android Studio, and the store back ends. It does not replace those tools; it orchestrates them through their command-line interfaces and public APIs, which is why it runs equally well on a developer laptop and on a continuous integration (CI) server.

How fastlane organizes automation into lanes

fastlane organizes work into lanes, which are named sequences of steps defined in Ruby inside the Fastfile. A lane such as beta might increment the build number, compile the app, sign it and upload it to TestFlight, while a release lane adds metadata and submits the build for review. Each step is an action, a reusable unit that wraps one task such as build_app or upload_to_play_store.

Several configuration files support the Fastfile. The Appfile stores identifiers such as the bundle ID, package name and team ID, the Matchfile configures certificate syncing, and the Pluginfile lists community extensions. Running fastlane beta reads these files, resolves parameters from arguments, environment variables or defaults, and executes the actions in order, stopping at the first failure unless an error handler is defined.

The following table lists the files that a typical project keeps in its fastlane directory and what each one controls.

FilePurposeTypical content
FastfileDefines lanes and their stepsRuby code with platform blocks and lanes
AppfileStores app and account identifiersBundle ID, package name, team ID
MatchfileConfigures shared code signingStorage type, repository URL, profile type
PluginfileDeclares third-party pluginsGem names loaded through Bundler
GemfilePins the fastlane versionRuby gem dependencies and versions
Core fastlane configuration files

Key fastlane actions for iOS and Android

The value of fastlane comes from its built-in actions, which cover nearly every stage of a release. Many of them began as separate tools with short names, and those legacy aliases such as gym, match and supply still appear in older scripts and documentation, so practitioners should recognize both names.

ActionLegacy aliasPlatformWhat it does
build_appgymiOSArchives and exports a signed IPA
sync_code_signingmatchiOSShares certificates and profiles across a team
run_testsscaniOSRuns XCTest suites and produces reports
upload_to_testflightpilotiOSSends builds to TestFlight testers
upload_to_app_storedeliveriOSUploads metadata, screenshots and binaries
capture_screenshotssnapshotiOSGenerates localized screenshots in simulators
upload_to_play_storesupplyAndroidPublishes AAB files and store listings
gradlenoneAndroidRuns Gradle tasks such as bundleRelease
Frequently used fastlane actions

Beyond built-in actions, a plugin ecosystem adds integrations for crash reporting, version management and distribution services. Plugins are Ruby gems, so they inherit the same dependency risks as any third-party package and should be pinned to known versions.

Code signing with match

The most influential idea in fastlane is the match approach to code signing. Instead of every developer creating personal certificates in the Apple Developer portal, match stores one shared set of certificates and provisioning profiles in an encrypted Git repository, cloud bucket or similar store. Each machine, including CI runners, decrypts and installs the same identities, which removes the classic signing drift that breaks builds.

match encrypts the stored files with a passphrase supplied through an environment variable, and it can run in read-only mode on CI so that build agents never create or revoke certificates. For Android, signing is simpler because the upload keystore is a single file, yet teams still keep it outside the repository and inject it as a secret.

This table compares the main ways teams handle iOS signing and where fastlane fits.

StrategyHow it worksMain drawback
Xcode automatic signingXcode creates and renews identities per developerUnpredictable on CI machines
Manual profilesDevelopers download profiles from the portalSlow and error-prone for teams
fastlane matchEncrypted shared store synced to every machineRequires careful secret handling
CI vendor signingHosted service manages identitiesTies signing to one provider
iOS signing strategies compared

fastlane is a release orchestrator, not a build system or a hosting platform. Xcode and Android Studio remain the places where code is written and compiled, Gradle and xcodebuild perform the actual builds, and CI services provide the machines. fastlane coordinates these pieces with a portable, version-controlled script.

Cross-platform frameworks such as Flutter and React Native also rely on fastlane for the native release step, since both ultimately produce standard iOS and Android binaries. Expo projects often use EAS Build and EAS Submit instead, which cover similar ground as a hosted service.

Tool typeExample roleRelation to fastlane
Native IDEEditing, debugging, local buildsfastlane calls its command-line tools
Build systemCompiling and packaging codefastlane invokes Gradle or xcodebuild
CI serviceProvides runners and triggersRuns fastlane lanes as pipeline steps
Hosted mobile pipelineManaged builds and submissionAlternative or complement to fastlane
Store APIsReceive builds and metadatafastlane is a client of these APIs
Where fastlane fits among release tools

Practical setup and common pitfalls

A reliable setup starts with pinning fastlane through Bundler and running it as bundle exec fastlane, so that every machine uses the same version. Authentication to Apple should use an App Store Connect API key rather than a personal Apple ID, because API keys avoid two-factor prompts and session expiry on unattended runners. Google Play uploads use a service account JSON key with limited permissions.

  • Unpinned versions cause sudden failures when Apple or Google change an API and a newer action behaves differently.
  • Secrets committed to Git, such as keystore passwords or match passphrases, expose signing identities; store them in the CI secret manager.
  • Monolithic lanes that build, test and release in one step make failures hard to diagnose; split them into smaller lanes.
  • Ignoring Ruby environment issues on macOS, such as relying on the system Ruby, leads to permission and gem conflicts.

Teams should also remember that fastlane depends on store interfaces it does not control. When Apple or Google change their APIs, some actions may break until the community releases a fix, so a manual fallback procedure for urgent releases remains good practice.

In everyday language

Publishing a phone app involves many small chores: building the app, proving it really comes from you, testing it, taking screenshots and sending everything to Apple and Google. Doing those chores by hand is slow and error-prone, and people forget steps.

fastlane is like a written checklist that performs itself. A team describes the steps once, and afterward one short command runs the whole routine the same way every time, on any computer. The main benefit is consistency: fewer mistakes, faster releases and less time spent clicking through store websites.

Seen in the real world

A small team maintaining a banking app for iOS and Android used to spend about half a day on each release. One developer held the only working signing certificate, screenshots were updated by hand in five languages, and uploads often failed late on Friday afternoons.

The team moved its process into fastlane. A beta lane now runs tests, builds both apps, signs the iOS build with certificates synced through match and sends it to TestFlight and the Play internal testing track. A release lane regenerates localized screenshots and uploads metadata. Their CI service runs these lanes automatically on every merge to the main branch.

Within a month, releases took about twenty minutes of unattended pipeline time, any developer could ship a build, and signing errors disappeared from the release checklist.