Is the app build number still customizable?

I've noticed that my app's build number I set in the project doesn't seem to be respected anymore in TF using Xcode Cloud. Is this a new requirement that the build. number follow the CI_BUILD_NUMBER set by Xcode Cloud? Our build process uses the build number to tie into our other build processes (cross-platform).

Thanks

TF ???

TestFlight

+1

I've been looking all over for this, and finally discovered a setting in App Store Connect --> Xcode Cloud --> Settings --> Build Number. Not sure if there's a way to set this with an outside process, but you can at least set a starting number and it should auto increment.

Hi,

I do set the build number based on a git pre-commit hook for every commit. Using tools like autohook you should be quite fast in fitting this to your own processes.

As an example the script I use:

#!/usr/bin/env bash

git=$(which git)

PlistBuddy="/usr/libexec/PlistBuddy"

REPO_ROOT_PATH=$("$git" rev-parse --show-toplevel)

GIT_BRANCH_NAME=$("$git" -C "$REPO_ROOT_PATH" branch --show-current)

GIT_HASH=$("$git" -C "$REPO_ROOT_PATH" show -s --format=%H)

GIT_NUMBER_OF_COMMITS=$("$git" -C "$REPO_ROOT_PATH" rev-list HEAD --count)

GIT_RELEASE_VERSION=$("$git" -C "$REPO_ROOT_PATH" describe --tags --always --abbrev=0)

IOS_PLIST_PATH="$REPO_ROOT_PATH/iOS/Info.plist"

MACOS_PLIST_PATH="$REPO_ROOT_PATH/macOS/Info.plist"

TVOS_PLIST_PATH="$REPO_ROOT_PATH/tvOS/Info.plist"

echo "GIT: $git"

echo "NUMBER_OF_COMMITS: $GIT_NUMBER_OF_COMMITS"

echo "RELEASE_VERSION: $GIT_RELEASE_VERSION"

for plist in "$IOS_PLIST_PATH" "$MACOS_PLIST_PATH" "$TVOS_PLIST_PATH"; do

  if [ -f "$plist" ]; then

    echo "PATCH: $plist"

    "$PlistBuddy" -c "Set :CFBundleVersion $GIT_NUMBER_OF_COMMITS" "$plist"

    "$PlistBuddy" -c "Set :GitBranchName $GIT_BRANCH_NAME" "$plist"

    "$PlistBuddy" -c "Set :GitHash $GIT_HASH" "$plist"

    "$git" add "$plist"

  fi

done

Kind regards, Sascha

Is the app build number still customizable?
 
 
Q