For some reason fastlane deliver has started using the marketing version defined in our .xcodeproj file instead of the version we dynamically pass in during the pipeline run.
I can see the correct version is being set/referenced during the run at various points:
[16:34:28]: $ cd /Users/****/appname && agvtool new-marketing-version 2.11.1
[16:34:28]: ▸ Setting CFBundleShortVersionString of project appname to:
[16:34:28]: ▸ 2.11.1.
[16:34:28]: ▸ Updating CFBundleShortVersionString in Info.plist(s)...
[16:34:28]: ▸ Updated CFBundleShortVersionString in "appname.xcodeproj/../Info.plist" to 2.11.1
Further down at the deliver stage for some reason app_version is 9.9.9
+--------------------------------------+-----------------------------------+
| deliver 2.207.0 Summary |
+--------------------------------------+-----------------------------------+
| ipa | ./build/appname.ipa |
| precheck_include_in_app_purchases | false |
| submit_for_review | false |
| force | true |
| metadata_path | .fastlane/metadata |
| api_key | ******** |
| screenshots_path | ./.fastlane/screenshots |
| app_version | 9.9.9
Lane context on error - trying to upload existing (and incorrect) 9.9.9 version
| LATEST_TESTFLIGHT_VERSION | 2.11.1 |
| BUILD_NUMBER | 1 |
| VERSION_NUMBER | 2.11.1 |
| IPA_OUTPUT_PATH | /Users/****/build/appname.ipa |
| XCODEBUILD_ARCHIVE | ./archive/appname2022-07-12 16.35.38.xcarchive |
|
+------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
[16:42:44]: Error uploading ipa file:
[Transporter Error Output]: ERROR ITMS-90189: Redundant Binary Upload. You've already uploaded a build with build number '1' for version number '9.9.9'.
We've updated the build machine to xcode 13.4.1 from 13.1 and disabled bitcode but not changed anything in fastlane around versioning.
We've also gone up a minor version 2.10.x to 2.11.x - I doubt any of these things could cause this?
Appreciate any ideas or configuration to check
fastlane lane:
increment_build_number_from_appstore(
app_version: options[:app_version],
asc_key_id: options[:asc_key_id],
asc_issuer_id: options[:asc_issuer_id],
asc_key: options[:asc_key])
increment_version_number(
version_number: options[:app_version],
xcodeproj: @xcode_project)
build_app(
scheme: @scheme,
export_method: "app-store",
export_options: {
provisioningProfiles: {
"com.xxxxx" => "match AppStore com.xxxxx
}
},
configuration: "Release",
include_symbols: true,
project: @xcode_project,
build_path: @archive_directory,
output_directory: @output_directory,
cloned_source_packages_path: options[:cloned_source_packages_path],
output_name: "appname")
deliver(
ipa: @ipa,
precheck_include_in_app_purchases: false,
submit_for_review: false,
force: true,
metadata_path: ".fastlane/metadata")
Update: reverting to Xcode 13.1 and the versioning is fine again - do we need to configure something on the build machine or sounds like a bug?