FAQs

I'm getting an SSL error

If your output contains something like

SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed

that usually means you are using an outdated version of OpenSSL. Make sure to install the latest one using homebrew.

brew update && brew upgrade openssl

If you use rvm, try the following

rvm osx-ssl-certs update all

fastlane is slow (to start)

If you experience slow launch times of fastlane, try this to solve this problem:

Uninstall unused gems
[sudo] gem cleanup

Error when running fastlane with Jenkins

This is usually caused when running Jenkins as its own user. While this is possible, you'll have to take care of creating a temporary Keychain, filling it and then using it when building your application.

For more information about the recommended setup with Jenkins open the Jenkins Guide.

Code signing issues

Check out the codesigning.guide website for more information on how to properly setup code-signing in your team using match.

When should I use cert, sigh and match?

  • cert allows you to create a new code signing certificate + private key (note that the private key is only stored on your machine and won't be synced to any other mac)
  • sigh allows you to create and download a provisioning profile (those are synced via the  developer portal)
  • match uses those 2 tools in combination with a git repo you provide, to sync all private key, certificates and provisioning profiles across all your team's Macs and CI servers

We recommend using match as it removes the complexity out of code signing, while still being in full control. This way you can sync all the signing identities across your team and your CI server. For more information check out codesigning.guide.

Multiple targets of the same underlying app

If you have one code base, but multiple branded applications

Create different .env files for each environment and reference those environment variables in the Deliverfile, Fastfile, etc.

Example: Create a .env.app1, .env.app2, and .env.app3. Define each of these like the following...

DLV_FIRST_NAME=Josh
DLV_LAST_NAME=Holtz
DLV_PRIM_CATG=Business
DLV_SCND_CATG=Games

Now your Deliver file should look something like this:

app_review_information(
  first_name: ENV['DLV_FIRST_NAME'],
  last_name: ENV['DLV_LAST_NAME']
)

primary_category ENV['DLV_PRIM_CATG']
secondary_category ENV['DLV_SCND_CATG']

Now to run this, all you need to do is specify the environment argument when running fastlane and it will pull from the .env file that matches the same name... Ex: fastlane build --env app1 will use .env.app1 Ex: fastlane build --env app2 will use .env.app2

You can also references these environment variables almost anywhere in fastlane.

You can even define a lane to perform actions on multiple targets:

desc "Deploy both versions"
lane :deploy_all do
    sh "fastlane deploy --env paid"
    sh "fastlane deploy --env free"
end

And you can combine multiple envs in one go Ex: fastlane build --env app1,env1,env2 will use .env.app1 .env.env1 and .env.env2

More on the .env file can be found here.

Disable colored output

Set the FASTLANE_DISABLE_COLORS or the NO_COLOR environment variable to disable ANSI colors (e.g. for CI machines)

export FASTLANE_DISABLE_COLORS=1
export NO_COLOR=1

Enable tab auto complete for fastlane lane names

Supported shells: bash, zsh, fish.

fastlane enable_auto_complete

Follow the on screen prompt to add a line to your bash/zsh/fish profile.

"User interaction is not allowed" when using fastlane via SSH

This error can occur when you run fastlane via SSH. To fix it check out this reply on StackOverflow.

Some fastlane commands like deliver, scan, gym, or pilot hang indefinitely or produce strange errors and symbols

Make sure your LC_ALL and LANG variables are set up correctly. fastlane requires an UTF-8 environment, so setting those variables to en_US.UTF-8 should fix your issues. Refer to the fastlane setup instructions for details.