This is a tip originally from Ben Scheirman on using Fastlane to bump the major.minor.patch numbering.

It comes in handy, especially now that we have so many extensions, such as the new WidgetKit extension.

App Store requires the SAME version numbers for ALL of your targets. If you have been setting them manually, make use of Fastlane.

1. Set Marketing Version

Firstly, use agvtool to set the marketing version (CFBundleShortVersionString). This is required if you have never set it before.

For example, I set to “1.23” (using only major and minor).

agvtool new-marketing-version 1.23

2. Add to Fastlane

Add the following to your Fastlane. This is a shortcut to generate 3 lanes.

# Lanes: bump_major, bump_minor, bump_patch
%w{major minor patch}.each do |part|
  lane "bump_#{part}".to_sym do
    increment_version_number(bump_type: part)

Now, to bump the minor, run fastlane bump_minor.

3. Also, bump build

For consistently, I also have a fastlane bump to bump the build number.

lane :bump do




Back to Home