Reputation: 2889
I have an existing app and want to use Fastlane
so after adding some configuration I want to send the new build to testflight,
so I use this lane
platform :ios do
private_lane :staging_build do
increment_build_number(xcodeproj: './ios/myapp.xcodeproj')
gym(scheme: 'myApp', workspace: './ios/myapp.xcworkspace')
end
desc 'Build & send to testflight'
lane :upload_to_testF do
staging_build
upload_to_testflight(username: '*****@gmail.com', app_identifier: 'com.comp.myapp')
commit_version_bump(message: 'bump build')
push_to_git_remote
end
end
So after run
fastlane ios send_to_testF
.ipa file generated and build number increment
I got this error after all
ERROR ITMS-90186: "Invalid Pre-Release Train. The train version '1.0.14' is closed for new build submissions"
ERROR ITMS-90062: "This bundle is invalid. The value for key CFBundleShortVersionString [1.0.14] in the Info.plist file must contain a higher version than that of the previously approved version [1.0.14]. Please find more information about CFBundleShortVersionString at https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleshortversionstring"
I have this version in the app store
and here's the same in Xcode
so why do they ask to increment it! even I just try and incremented it to 1.0.15 in both code & app store but still got the same error!
Upvotes: 0
Views: 1149
Reputation: 1014
You can use the below to retrieve the current build for the current version on appStore and auto increment this build number:
current_version = get_version_number(
xcodeproj: xcodeproj,
target: ENV["TARGET"]
)
latest_build_number = latest_testflight_build_number(
version: current_version,
app_identifier: ENV["BUNDLE_ID"]
)
build_number = (latest_build_number + 1)
increment_build_number(
xcodeproj: xcodeproj,
build_number: build_number,
)
While ENV["BUNDLE_ID"]
is the project bundle ID, xcodeproj
is your xcodeproj name & ENV["TARGET"]
is the specific target is being used in the current build.
Upvotes: 1
Reputation: 503
Apple connect wont accept new release with the same version number, but you can let fastlane handle that to ensure you wont miss something. Use something like:
...
increment_version_number(
version_number: "1.0.15" # Set a specific version number
)
Upvotes: 1