GitHub

fastlane tools integration

What is fastlane?

fastlane lets you define and run your deployment pipelines for different environments. It helps you unify and automate your app’s release process. fastlane connects all fastlane tools and third party tools, like CocoaPods and xctool.

fastlane is a collection of ruby gems that cover the most usual tasks required during iOS app development and upload or update to the App Store.

Bitrise offline CLI

We have an open source, offline CLI, which can be used in a similar way as fastlane. If you’re interested, you can find the CLI’s website here, and its GitHub repository here. You can use this CLI to run your bitrise configurations locally, which can include runing fastlane too as part of the build.

How to get started?

Using fastlane for your workflow is easy as pie. Just add the Fastlane step to your workflow after the Git Clone step (and any other dependency step).

Have our Certificate and profile installer step in your workflow!

You should also add/keep the Certificate and profile installer step in the workflow, to download your .p12 Certificates and Provisioning Profiles uploaded to bitrise.io and to install them. Even if you don’t upload your files to bitrise.io and instead you use a fastlane tool to manage your code signing files you should still keep this step in the workflow. Read more about iOS Code Signing using third party tools.

With adding the fastlane step we ensure that you are running on the latest fastlane version, as it is pre-installed on all our VMs. Inside the step you can set the fastlane action and we will run it automatically every time you push a new code change.

For more configuration options see the Fastlane step’s description in the Workflow Editor!

iOS code signing guide

If you want to use bitrise.io to store your code signing files, you should just follow the iOS Code Signing guide here.

Two-factor authentication

Two-factor authentication (2FA) is mandatory for all Apple Developer Portal accounts. If, during your build, Bitrise needs to access your Apple Developer Portal account, it will have to go through 2FA. This applies even if you use fastlane!

To make this work, connect your Apple Developer Account to Bitrise. That allows Bitrise to reuse your authentication sessions for 30 days so you do not have to manually go through 2FA on every single occasion.

What’s next?

fastlane’s greatness comes from its ability to define different lanes for your different deployment needs - hence the name. You can combine this with Bitrise and run separate lanes for separate branches, automatically. For example you can run a lane for every code push onto the master branch to update your screenshots and metadata on the App Store and to release the distribution version, and a separate lane for the develop branch to deploy your test releases and all the others to ensure that nobody has broken anything. You can simply clone the workflow as many times as you want to, and use the Trigger feature of bitrise.io to define which Workflow to be selected for this branch / tag / pull request. You can find more information about the Triggers feature in the Control what to build when, with the Trigger Map guide.

We hope that you are as happy as we are to have this amazing tool inside Bitrise. Go ahead and try it out!

And as always, happy building!