LinuxCommandLibrary

fastlane

Automate mobile app deployment processes

TLDR

Build and sign the iOS application in the current directory

$ fastlane run build_app
copy

Run pod install for the project in the current directory
$ fastlane run cocoapods
copy

Delete the derived data from Xcode
$ fastlane run clear_derived_data
copy

Remove the cache for pods
$ fastlane run clean_cocoapods_cache
copy

SYNOPSIS

fastlane [command | lane_name] [options | key:value ...]

PARAMETERS

--verbose
    Prints out more information during execution, including all the commands that are being run.

--silent
    Hides all fastlane output, except for errors and critical information.

--env
    Specifies a fastlane environment. This loads a specific .env file (e.g., .env.production) to define environment variables for the run.

--help
    Displays help information for the fastlane command, a specific tool (e.g., fastlane gym --help), or a defined lane.

--version
    Prints the currently installed fastlane version.

key:value
    Passes arbitrary arguments to a specific fastlane lane. These arguments can then be accessed and utilized within the lane's definition (e.g., fastlane deploy build_number:123).

DESCRIPTION

fastlane is an open-source platform designed to simplify and automate the entire mobile app development lifecycle for both iOS and Android. It provides a collection of tools, known as actions, and a flexible Ruby-based Domain Specific Language (DSL) to define custom workflows called lanes.

Developers define these lanes and their sequence of actions in a file named Fastfile within their project. Common automation tasks handled by fastlane include: managing code signing assets (provisioning profiles, certificates) with match, building app binaries with gym (for iOS) or gradle (for Android), generating localized screenshots with snapshot, distributing beta versions to testers via services like TestFlight or Firebase App Distribution, and submitting final builds to the Apple App Store or Google Play Store using deliver.

By integrating with various development tools and services, fastlane helps ensure consistent, repeatable, and error-free app delivery processes, significantly reducing manual effort and speeding up development cycles.

CAVEATS

fastlane requires a Ruby environment to run, typically managed via Bundler. While it runs on Linux, its primary utility is for automating iOS (which usually requires macOS for Xcode) and Android (which can be done on Linux) mobile app workflows. Initial setup involves configuring project-specific files like Fastfile and managing mobile development dependencies (e.g., Xcode, Android SDK, signing assets).

<B>FASTFILE</B>

The central configuration file for fastlane, written in Ruby. It defines the automated workflows (lanes) and orchestrates the execution of various actions and plugins for a mobile project.

<B>LANES</B>

Specific sequences of actions defined within the Fastfile. Each lane represents a distinct workflow, such as beta for distributing test builds, release for submitting to app stores, or tests for running unit/UI tests.

<B>ACTIONS</B>

Individual building blocks or tasks that make up a fastlane lane. fastlane provides hundreds of built-in actions (e.g., gym for building, deliver for submission, match for code signing) and supports custom actions created by developers.

<B>PLUGINS</B>

Extend fastlane's capabilities by adding new actions or integrations with third-party services that are not part of the core fastlane distribution. The fastlane community actively develops and shares plugins.

HISTORY

fastlane was created by Felix Krause in 2014 to address the pain points of mobile app release automation. It quickly gained popularity within the iOS and Android development communities due to its comprehensive feature set and extensibility. In 2017, Google acquired fastlane, but it continues to be developed as a thriving open-source project, maintained by a community of contributors and Google engineers.

SEE ALSO

ruby(1), bundle(1), git(1), docker(1)

Copied to clipboard