Skip to content
Mobileintermediate

What is fastlane?

Updated Nov 30, 20263 min readBased on official documentation
What is fastlane?

In short

fastlane is an open source tool that automates the repetitive work of shipping mobile apps. It can build your iOS or Android app, handle code signing, upload betas and releases to the stores, and notify your team. You describe these steps once in a Fastfile and run them with a short command.

What fastlane does

Shipping a mobile app involves many small, boring steps. You bump a build number, build the binary, sign it, upload it to a beta service, take screenshots, and send the release to the app store. Doing this by hand is slow and easy to get wrong. fastlane is a command line tool that runs these steps for you, in the same order every time.

The documentation describes fastlane as a way to automate beta deployments and releases for iOS and Android apps. It also handles tasks such as generating screenshots and dealing with code signing, which is the process that proves to Apple or Google that your app came from you.

How it works

fastlane organizes work into lanes. A lane is a named list of actions. You write these lanes in a file called Fastfile, which lives in your project repository. Here is a small example:

lane :beta do
  increment_build_number
  build_app
  upload_to_testflight
end

lane :release do
  capture_screenshots
  build_app
  upload_to_app_store
  slack
end

This file defines two lanes. The beta lane bumps the build number, builds the app, and uploads it to TestFlight, Apple's beta testing service. The release lane takes screenshots, builds the app, uploads the binary and screenshots to the App Store, and then posts a message to Slack so your team knows the new version is live.

To run a lane, you type fastlane followed by the lane name, for example fastlane release. Each action is a built-in helper that fastlane already knows how to run. You do not need to remember the individual commands behind them.

Installing fastlane

The documentation recommends installing fastlane with Bundler. Bundler is a Ruby tool that manages the libraries a project depends on. fastlane is written in Ruby, so you will need Ruby first. The documentation says fastlane supports Ruby 3.2 or newer and prefers Ruby 3.3 or greater. You can check your version with ruby --version.

The basic steps are to install Bundler, create a Gemfile in your project root that lists fastlane as a dependency, run bundle update, and commit both the Gemfile and the Gemfile.lock to version control. After that, run fastlane through bundle exec, for example bundle exec fastlane beta. This pins the fastlane version for everyone on the team and on your build server.

On macOS, Homebrew can also install fastlane. Homebrew then installs a suitable Ruby version for you. The documentation advises against using the system Ruby that ships with macOS, because it can be hard to manage and can cause conflicts. Installing with sudo gem is possible but not recommended for a local setup.

Once installed, run fastlane init inside your iOS or Android project. fastlane detects your project and asks for any missing information. If you are new to the tool, the official Getting Started guides for iOS and Android are the best next step.

When to use it

fastlane fits best when you ship builds often, or when you publish to several places and want the same steps every time. It is also useful on a continuous integration server, where a build machine runs your lanes without a person at the keyboard. The documentation notes that you can deploy from any computer, including a CI server.

The tool supports iOS, Mac, and Android apps. Official support is on macOS. The documentation says Linux and Windows are partially supported: many actions and the spaceship module work there, but some software such as Xcode only runs on macOS. If your iOS builds need Xcode, plan for a Mac.

Common mistakes

A frequent mistake is installing fastlane globally and then running it on a different version on another machine. Using Bundler and committing the Gemfile.lock avoids this. Another mistake is running fastlane with sudo, which can cause file permission problems later.

It also helps to know that fastlane runs on your own computer or server. Your credentials stay on that machine, according to the documentation. Keep your signing files and store logins safe, because fastlane does not manage that responsibility for you.

Alternatives and metrics

fastlane is not the only way to automate mobile releases. Many teams use the store consoles directly, or build their own scripts with shell commands. The trade-off is that a script is yours to maintain, while fastlane gives you a shared set of actions and integrations. The project lists more than 400 integrations, so check whether your existing tools are already covered.

fastlane also collects some anonymous usage metrics, such as the number of runs and the fastlane version. The documentation says no personal or sensitive information is collected. You can opt out by adding opt_out_usage at the top of your Fastfile, or by setting the environment variable FASTLANE_OPT_OUT_USAGE.

For the full details, read the official documentation at https://docs.fastlane.tools/.

FAQ

Do I need a Mac to use fastlane?

For iOS and Mac apps, yes in practice, because Xcode only runs on macOS. The documentation says fastlane is officially supported on macOS, while Linux and Windows are only partially supported.

Should I install fastlane with Bundler or Homebrew?

The documentation prefers Bundler, because it pins the fastlane version and its dependencies in your project. Homebrew is a reasonable option on macOS if you do not want to manage Ruby yourself.

Where does fastlane run my code and credentials?

fastlane runs on your own computer or server, so your credentials and other sensitive data stay there. You remain responsible for how you use the tools.

Can fastlane run on a CI server?

Yes. The documentation says fastlane integrates with major CI systems and can deploy from any computer, including a CI server. On CI, run bundle install before your lanes.

Sources

This page is based on the official documentation below. Read it for full detail.

fastlane — official documentation ↗
blozhikDeveloper news from across the web, explained. Every story links to its original sources.