Automatic build number is always set to 1 #2251
-
If you are looking for help, please confirm the following...
Which mobile framework are you using?Flutter (Dart) Steps to reproduceAdd this script to prebuild script scripts: Expected resultsi would expect the new build number to be LATEST_BUILD_NUMBER + 1 Actual resultsFound build number 4 from TestFlight version 1.0.2 Also setting CFBundleVersion key (assuming it exists) Updating CFBundleVersion in Info.plist(s)... Updated CFBundleVersion in "Runner.xcodeproj/../Runner/Info.plist" to 1 Build id (optional)65717eecbe7b02f1e859a4e3 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hey @mostafaAbdelazim, you need to add the logic inside build arguments and not in the pre-build script, something like this you can also use a built-in variables like
The Also make sure that Info.plist file has the following string along with their key values
|
Beta Was this translation helpful? Give feedback.
Hey @mostafaAbdelazim, you need to add the logic inside build arguments and not in the pre-build script, something like this
--build-number=$(($(app-store-connect get-latest-testflight-build-number "$APP_ID") + 1))
you can also use a built-in variables like
PROJECT_BUILD_NUMBER
orBUILD_NUMBER
--build-name=1.2.$PROJECT_BUILD_NUMBER --build-number=$(($PROJECT_BUILD_NUMBER + 1))
The
PROJECT_BUILD_NUMBER
variable is a built-in environment variable that represents the current build number of your project.It is automatically incremented with each new build of your app.
image
Also make sure that Info.plist file has the following string along with their key values