Skip to content
DeveloperMemos

Upgrading Fastlane in Your iOS Project

Fastlane, iOS Development, Dependency Management1 min read

Fastlane is a powerful tool that streamlines repetitive tasks in your iOS development workflow. Keeping it up-to-date ensures you benefit from the latest features, bug fixes, and security improvements. Upgrading Fastlane is a straightforward process, but there are a few things to keep in mind.

Prerequisites

  • Existing Fastlane integration in your iOS project. This typically involves a Gemfile and Gemfile.lock file.
  • Basic understanding of RubyGems and Bundler.

Upgrading Fastlane

There's a single command to upgrade Fastlane in your project:

1bundle update fastlane

This command uses Bundler, the gem dependency manager, to update the fastlane gem in your Gemfile to the latest compatible version. It also updates the Gemfile.lock file to reflect the new version dependencies.

Important:

  • Always run bundle update in your project directory. This ensures Bundler uses the correct Gemfile and Gemfile.lock.
  • Commit both Gemfile and Gemfile.lock to version control after a successful update. This keeps track of your project's gem dependencies.

Verifying the Upgrade

Once the update is complete, you can verify the new version by running:

1bundle show fastlane

This will display information about the installed fastlane gem, including its version number.

Testing After Upgrade

After upgrading, it's recommended to test your existing Fastlane lanes to ensure they work as expected with the new version. You can run individual lanes using:

1bundle exec fastlane [lane_name]

Replace [lane_name] with the name of the specific lane you want to test.

Additional Tips

  • Consider using a continuous integration (CI) system to automate Fastlane updates. This ensures your project always uses the latest version.
  • Consult the official Fastlane documentation https://docs.fastlane.tools/getting-started/ios/setup/ for more information on managing gem dependencies and troubleshooting any upgrade issues.
  • If you're localizing your app metadata into a bunch of different languages also feel free to check out our locale cheatsheet for Fastlane(iOS).