How I can increment build number taken from Testflight

testflight
fastlane
ios
#1

Hello, I’m a bit novice in Bitrise and trying to build ci/cd based on the current solution,
Now I’m stuck on setting build number, our current solution based on fastlane.
In Fastlane we able to get the latest build number from the testfligh and then increment it, smt like this:

increment_build_number({
build_number: latest_testflight_build_number(app_identifier: bundle_id) + 1
})

But we would like to migrate and don’t use FastLane, so my question is how I can do the similar but using Bitrise workflow steps?
I’m looking on Set Xcode Project Build Number step but looks like not allow get build number dinamicly from Apple service

0 Likes

#2

Hello there @oleksandr_rudenko2 :wave:

Although there are a number of ways you can manage build numbering (which you can read about here: https://devcenter.bitrise.io/builds/build-numbering-and-app-versioning/) doing so automatically and dynamically from a third party service sounds a bit more complicated.

Probably the easiest would be to use Fastlane to get this Env Var (you could forego everything else related to Fastlane if you don’t want to keep using it), since Fastlane already has this built-in feature, and then put this information into an Env Var via envman: https://github.com/bitrise-io/envman

One other way you could go about this is to use the App Store Connect API: https://stackoverflow.com/questions/56362852/app-store-connect-api-last-uploaded-build-version-and-number

Hope this helps! :slight_smile:

0 Likes