Returns the current build_number of either live or edit version
Returns the current build number of either the live or testflight version - it is useful for getting the build_number of the current or ready-for-sale app version, and it also works on non-live testflight version.
If you need to handle more build-trains please see
|Supported platforms||ios, mac|
app_store_build_number( app_identifier: "app.identifier", username: "firstname.lastname@example.org" )
app_store_build_number( live: false, app_identifier: "app.identifier", version: "1.2.9" )
api_key = app_store_connect_api_key( key_id: "MyKeyID12345", issuer_id: "00000000-0000-0000-0000-000000000000", key_filepath: "./AuthKey.p8" ) build_num = app_store_build_number( api_key: api_key )
||Path to your App Store Connect API Key JSON file (https://docs.fastlane.tools/app-store-connect-api/#using-fastlane-api-key-json-file)|
||Your App Store Connect API Key information (https://docs.fastlane.tools/app-store-connect-api/#use-return-value-and-pass-in-as-an-option)|
||sets the build number to given value if no build is in current train|
||The bundle identifier of your app||*|
||Your Apple ID Username||*|
||The ID of your App Store Connect team if you're in multiple teams||*|
||Query the live version (ready-for-sale)||
||The version number whose latest build number we want|
||The platform to use (optional)||
||The name of your App Store Connect team if you're in multiple teams||*|
* = default value is dependent on the user's system
Actions can communicate with each other using a shared hash
lane_context, that can be accessed in other actions, plugins or your lanes:
app_store_build_number action generates the following Lane Variables:
||The latest build number of either live or testflight version|
||The version of the latest build number|
To get more information check the Lanes documentation.
To show the documentation in your terminal, run
fastlane action app_store_build_number
It is recommended to add the above action into your
Fastfile, however sometimes you might want to run one-offs. To do so, you can run the following command from your terminal
fastlane run app_store_build_number
To pass parameters, make use of the
: symbol, for example
fastlane run app_store_build_number parameter1:"value1" parameter2:"value2"
It's important to note that the CLI supports primitive types like integers, floats, booleans, and strings. Arrays can be passed as a comma delimited string (e.g.
param:"1,2,3"). Hashes are not currently supported.
It is recommended to add all fastlane actions you use to your
This action, just like the rest of fastlane, is fully open source, view the source code on GitHub