You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Getting the latest build number across ALL versions #320
Currently it seems this tool fetches the latest build number of the highest version number.
However, when dealing with hot fixes - we sometimes need to create a build in a lower version than the newest one.
Is there a way to instruct the tool to fetch the latest build number across all versions? (and not only from the highest one?)
Reacted by jczerniakiev, Damian Bast and Dawid van der Hoven
Thank you for reporting this issue. Can you tell us from what service you were trying to get the latest build number?
Please provide the exact commands you were using as well as a description of actual vs expected behavior.
I am probably facing the same issue as orenagiv.
This is Apple specific as for Android the build versions are globally unique, while for Apple distributions every version can have their own build numbers.
Simple case:
For the App we already build Version 2.0.0 with e.g. build number 5 but did not publish it yet, as the app is not final.
We had released 1.9.0 but now need to develop a quick fix 1.9.1 for some security issue.
When using appstoreconnect, we always going to receive 5 for the latest build number, as 2.0.0 > 1.9.1. Then the simple build number + 1 logic, is always going to return 6, which is not the version we want.
As soon as we need two build numbers for our 1.9.1 release, they are going to both have the version 6 and fail to upload.
Possible fix:
Allow the user to specify the version which should be checked for the latest build number.
Here, we could hand the public version (1.9.1 | 2.0.0) and receive the correct build number and increment it.
The exact command I am currently using $(app-store-connect get-latest-build-number "$APP_ID")
Update mainly for @orenagiv :
A possible supported way for the scenario seems to be get-latest-testflight-build-number which supports --pre-release-version to query a specific version.
Added --version-string argument to app-store-connectget-latest-build-number to pin the build number lookup to a specific version string across both App Store and TestFlight. This release. @sebimarkgraf
Also, we added --all-versions flag to app-store-connectget-latest-build-number, get-latest-app-store-build-number, and get-latest-testflight-build-number to scan across every version and returns the globally highest build number found, instead of returning the build of the highest version. This release. @orenagiv@dawidvdh
Reacted by Priit Lätt, David Maldonado and helinanever
Activity
helinanever commentedon Jun 20, 2023
Hi @orenagiv ,
Thank you for reporting this issue. Can you tell us from what service you were trying to get the latest build number?
Please provide the exact commands you were using as well as a description of actual vs expected behavior.
sebimarkgraf commentedon Jun 22, 2023
I am probably facing the same issue as orenagiv.
This is Apple specific as for Android the build versions are globally unique, while for Apple distributions every version can have their own build numbers.
Simple case:
For the App we already build Version 2.0.0 with e.g. build number 5 but did not publish it yet, as the app is not final.
We had released 1.9.0 but now need to develop a quick fix 1.9.1 for some security issue.
When using appstoreconnect, we always going to receive 5 for the latest build number, as 2.0.0 > 1.9.1. Then the simple build number + 1 logic, is always going to return 6, which is not the version we want.
As soon as we need two build numbers for our 1.9.1 release, they are going to both have the version 6 and fail to upload.
Possible fix:
Allow the user to specify the version which should be checked for the latest build number.
Here, we could hand the public version (1.9.1 | 2.0.0) and receive the correct build number and increment it.
The exact command I am currently using
$(app-store-connect get-latest-build-number "$APP_ID")sebimarkgraf commentedon Jun 22, 2023
Update mainly for @orenagiv :
A possible supported way for the scenario seems to be get-latest-testflight-build-number which supports
--pre-release-versionto query a specific version.dkbast commentedon Nov 19, 2025
@kevin-suhajda just ran into this as well - any pointers to how this could be implemented?
oleksiihuspy commentedon Mar 12, 2026
The same problem. Feels like custom build increment is the only option.
dawidvdh commentedon Mar 13, 2026
Experiencing the same issue here, I think we really need a
--all-versionsflag.helinanever commentedon Mar 13, 2026
Hi everyone, thanks for your comments. This request is in our backlog. We'll post an update on the issue once this is available.
mohammedbabelly20 commentedon May 7, 2026
Added
--version-stringargument toapp-store-connectget-latest-build-numberto pin the build number lookup to a specific version string across both App Store and TestFlight. This release. @sebimarkgrafAlso, we added
--all-versionsflag toapp-store-connectget-latest-build-number,get-latest-app-store-build-number, andget-latest-testflight-build-numberto scan across every version and returns the globally highest build number found, instead of returning the build of the highest version. This release. @orenagiv @dawidvdh