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.
| File | Purpose | Typical content |
|---|---|---|
| Fastfile | Defines lanes and their steps | Ruby code with platform blocks and lanes |
| Appfile | Stores app and account identifiers | Bundle ID, package name, team ID |
| Matchfile | Configures shared code signing | Storage type, repository URL, profile type |
| Pluginfile | Declares third-party plugins | Gem names loaded through Bundler |
| Gemfile | Pins the fastlane version | Ruby gem dependencies and versions |
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.
| Action | Legacy alias | Platform | What it does |
|---|---|---|---|
| build_app | gym | iOS | Archives and exports a signed IPA |
| sync_code_signing | match | iOS | Shares certificates and profiles across a team |
| run_tests | scan | iOS | Runs XCTest suites and produces reports |
| upload_to_testflight | pilot | iOS | Sends builds to TestFlight testers |
| upload_to_app_store | deliver | iOS | Uploads metadata, screenshots and binaries |
| capture_screenshots | snapshot | iOS | Generates localized screenshots in simulators |
| upload_to_play_store | supply | Android | Publishes AAB files and store listings |
| gradle | none | Android | Runs Gradle tasks such as bundleRelease |
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.
| Strategy | How it works | Main drawback |
|---|---|---|
| Xcode automatic signing | Xcode creates and renews identities per developer | Unpredictable on CI machines |
| Manual profiles | Developers download profiles from the portal | Slow and error-prone for teams |
| fastlane match | Encrypted shared store synced to every machine | Requires careful secret handling |
| CI vendor signing | Hosted service manages identities | Ties signing to one provider |
fastlane compared with related mobile tooling
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 type | Example role | Relation to fastlane |
|---|---|---|
| Native IDE | Editing, debugging, local builds | fastlane calls its command-line tools |
| Build system | Compiling and packaging code | fastlane invokes Gradle or xcodebuild |
| CI service | Provides runners and triggers | Runs fastlane lanes as pipeline steps |
| Hosted mobile pipeline | Managed builds and submission | Alternative or complement to fastlane |
| Store APIs | Receive builds and metadata | fastlane is a client of these APIs |
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.