Skip to content
This repository was archived by the owner on Jan 31, 2023. It is now read-only.

Simple Fastlane setup with plugins

Jimmy Dee edited this page Sep 2, 2017 · 2 revisions

See https://docs.fastlane.tools for full details on installing and setting up Fastlane for your project. A Gemfile is required to use Fastlane with plugins. For best results, install Fastlane using a Gemfile.

Prerequisites:

  • A working Ruby development environment.

    At a minimum, this requires the bundle command to be in your PATH.

    For this plugin, the system Ruby will usually be sufficient. However, for best results use RVM or rbenv to manage your Ruby environment any time you work with Ruby. See the RVM Cheat Sheet in this wiki to get started quickly with RVM.

Setup

  1. Add a file named Gemfile to the root of your project repository with these contents:

    source "https://rubygems.org"
    
    gem "fastlane"
  2. Run bundle install. This generates a file called Gemfile.lock in the same directory. Be sure to commit both Gemfile and Gemfile.lock to SCM.

  3. Now run all Fastlane commands using bundle exec fastlane, e.g. bundle exec fastlane lanes.

  4. Add Fastlane to your project. There are two options. Both options create a fastlane subdirectory in your project. Be sure to commit the contents of this directory to SCM.

    a) Run bundle exec fastlane init. This command is aimed at setting up a production app to build releases. It may not be the most convenient way to start in other cases.

    b) Copy the fastlane subdirectory from this repo:

    git clone https://github.com/BranchMetrics/fastlane-plugin-branch
    cp -r fastlane-plugin-branch/fastlane /path/to/myapp

    You can modify the Fastfile as you see fit.

  5. Run bundle exec fastlane add_plugin branch. This modifies the Gemfile, Gemfile.lock and fastlane/Pluginfile in the repo. All plugins in your Pluginfile are now available.

  6. Edit the fastlane/Branchfile for your project to use the appropriate Branch parameters.

Clone this wiki locally