Skip to content

Getting the latest build number across ALL versions #320

Closed

Description

@orenagiv

Hey,

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?)

Activity

  1. helinanever commented on Jun 20, 2023

    @helinanever
    Contributor

    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.

  2. sebimarkgraf commented on Jun 22, 2023

    @sebimarkgraf

    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")

  3. sebimarkgraf commented on Jun 22, 2023

    @sebimarkgraf

    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.

  4. dkbast commented on Nov 19, 2025

    @dkbast

    @kevin-suhajda just ran into this as well - any pointers to how this could be implemented?

  5. oleksiihuspy commented on Mar 12, 2026

    @oleksiihuspy

    The same problem. Feels like custom build increment is the only option.

  6. dawidvdh commented on Mar 13, 2026

    @dawidvdh

    Experiencing the same issue here, I think we really need a --all-versions flag.

  7. helinanever commented on Mar 13, 2026

    @helinanever
    Contributor

    Hi everyone, thanks for your comments. This request is in our backlog. We'll post an update on the issue once this is available.

  8. removed theissue type on Mar 19, 2026
  9. added
    enhancement
    on Mar 19, 2026
  10. mohammedbabelly20 commented on May 7, 2026

    @mohammedbabelly20
    Contributor

    Added --version-string argument to app-store-connect get-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-connect get-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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions