New to fastlane? Click here to open the installation & setup instructions first

1) Install the latest Xcode command line tools

xcode-select --install

2) Install fastlane

# Using RubyGems
sudo gem install fastlane -NV

# Alternatively using Homebrew
brew install fastlane

3) Navigate to your project and run

fastlane init

More Details

Continuous Integration

fastlane works very well in Continuous Integration setups. It for example automatically generates a JUnit report for you that allows Continuous Integration systems, like Jenkins, access the results of your deployment.

Integrations

Multiple CI products and services offer integrations with fastlane:

Authenticating with Apple services

Check out Authenticating with Apple services to learn the best ways to authenticate, catered for your specific use case.

Environment variables to set

Most setups will need the following environment variables

  • FASTLANE_USER: Your App Store Connect / Apple Developer Portal user, if your fastlane setup accesses App Store Connect or the Apple Developer Portal (e.g. submit a TestFlight build, create a profile, ...)
  • FASTLANE_PASSWORD: Your App Store Connect / Apple Developer Portal password, usually only needed if you also set the FASTLANE_USER variable
  • MATCH_PASSWORD: You need to provide the password of your match encryption if you use match
  • FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: You need to provide an application specific password if you have 2-factor enabled and use pilot or deliver to upload a binary to App Store Connect
  • FASTLANE_SESSION: You need to provide a pregenerated session via fastlane spaceauth if you have 2-factor authentication enabled and want to use any actions that communicates with App Store Connect.
  • LANG and LC_ALL: These set up the locale your shell and all the commands you execute run at. fastlane needs these to be set to an UTF-8 locale to work correctly, for example en_US.UTF-8. Many CI systems come with a locale that is unset or set to ASCII by default, so make sure to double-check whether yours is set correctly.
  • SPACESHIP_ONLY_ALLOW_INTERACTIVE_2FA: Explicitly prevents being prompted for 2FA in non-interactive mode.

Deploy Strategy

You should not deploy a new App Store update after every commit, since you still have to wait 1-2 days for the review. Instead it is recommended that you use Git Tags, or custom triggers to deploy a new update.

You can set up your own Release job, which is only triggered manually.

Moved

The following tool- and service-specific content was moved:

Jenkins Integration

This content was moved and now lives here.

CircleCI Integration

This content was moved and now lives here.

Travis Integration

This content was moved and now lives here.

Bamboo Integration

This content was moved and now lives here.

GitLab CI Integration

This content was moved and now lives here.

Visual Studio Team Services

This content was moved and now lives here.

Nevercode Integration

This content was moved and now lives here.