Skip to content

Fastlane

Fastlane is a popular tool for automating the build and release process for iOS and Android apps. Shorebird can be integrated with fastlane to automate releasing and patching.

Installation

Follow the setup instructions on the fastlane website to install fastlane (ios, android).

Setup

If you are not already using fastlane with your project, navigate to your app’s ios directory in your project and run fastlane init. You will be prompted to answer several questions. For this guide, we will choose to manually add lanes to the Fastfile.

Use the Shorebird plugin

Run the following command to install the shorebird fastlane plugin, which exposes the shorebird_release and shorebird_patch actions.

Terminal window
bundle exec fastlane add_plugin shorebird

Update Fastfile to release

Open the Fastfile in the fastlane directory and add the following lane:

lane :release_shorebird do
shorebird_release(platform: "ios")
upload_to_testflight
end

To run this, execute the following command:

Terminal window
bundle exec fastlane release_shorebird

If you would like to provide additional arguments to the release command, you can do so using the args parameter. For example:

shorebird_release(platform: "ios", args: "--no-codesign -- --build-name=1.0.0")

Update Fastfile to patch

Open the Fastfile in the fastlane directory and add the following lane:

lane :patch_shorebird do
shorebird_patch(platform: "ios")
end

This will patch the iOS release with the version number detected in the compiled app and patch the release with that version.

As with shorebird_release, you can provide additional arguments to the patch command using the args parameter.

shorebird_patch(platform: "ios", args: "--allow-native-diffs -- --build-name=1.0.0")