Repository navigation
Conversation
CFBundleVersion is Xcode Cloud's run counter, so "Build 272" maps to no commit without an App Store Connect lookup. The footer now reads "Version 2026.9.3 • Build 272 • 2acfecffeb" in every build, matching the Android change. Scripts/write_commit_xcconfig writes GIT_COMMIT_SHA to a gitignored Configurations/commit.local.xcconfig, which Info.plist exposes as FCGitCommit. It runs from the Flipcash scheme's build pre-action and from the new ci_scripts/ci_pre_xcodebuild.sh. On Xcode Cloud it takes CI_COMMIT and never adds -dirty; locally it uses git rev-parse HEAD plus -dirty when git status reports changes. base.xcconfig defaults the setting to "unknown", so a clone that never ran the script still builds. BuildCommit parses the stamp and owns the 10-character display. Tapping the footer copies the full SHA and shows "Copied" through the existing toast; the beta-unlock countdown still wins on its last taps. Bugsnag events carry the raw stamp as app.commit.
Android's footer changed in code-payments/code-android-app#1571, and the two apps share one format: Version 2026.9.3 • Build 272 2acfecffeb - The commit moves to a second line, followed by " • <track>" when there is one. iOS has no release track yet, so its second line is the hash. Without a commit the footer is the old single line. - A dirty build is marked "*" instead of "-dirty", and only changes to tracked files count, as on Android (git diff --quiet HEAD). The generated GoogleService-Info.plist is excluded because the Generate Google phase rewrites it on every build with secrets. - Tap-to-copy is gone; the footer tap drives only the beta unlock count.
Line 2 of the footer now ends with ` • development` in a DEBUG build and ` • beta` on TestFlight, matching Android. App Store builds show no track. TestFlight and the App Store run the same Release binary, so the track comes from StoreKit's AppTransaction environment (`.sandbox` on TestFlight), read once when the You screen appears. If StoreKit can't answer, no track is shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The You screen footer's build number is Xcode Cloud's run counter (
CFBundleVersion), so it maps to no commit without an App Store Connect lookup. The footer now shows the first 10 characters of the commit SHA on a second line, in every build, App Store and TestFlight included:This matches Android's footer from code-payments/code-android-app#1571. Line 2 ends with
• developmentin a DEBUG build and• betaon TestFlight. An App Store build shows no track, so its line 2 is only the hash. A build with uncommitted changes shows2acfecffeb*. With no commit, the footer falls back to the old single line.How the SHA gets into the build
Scripts/write_commit_xcconfigwritesGIT_COMMIT_SHA = <sha>toConfigurations/commit.local.xcconfig, which is gitignored and optionally included bybase.xcconfig. The Flipcash Info.plist exposes it asFCGitCommit, andAppMeta.commitreads it with the sameunknownfallback asAppMeta.build.The script runs from two places:
ci_scripts/ci_pre_xcodebuild.shcalls it before everyxcodebuild. It takesCI_COMMITand never appends*, since package resolution and the generated Google plist can touch the clone's working tree.git rev-parse HEADand appends*whengit diff --quiet HEADreports changes to tracked files, the same rule Android uses. Untracked files don't count.GoogleService-Info.plistis excluded because it's tracked but the "Generate Google" phase rewrites it from secrets on every build. On Xcode Cloud this pre-action also runs, butCI_COMMITtakes precedence there too.I used a scheme pre-action rather than a Run Script phase for two reasons. Pre-actions run before build settings are resolved, so the value lands in the same build; a Run Script phase would always be one build behind. And under
ENABLE_USER_SCRIPT_SANDBOXING, a Run Script phase can't read.git. A local build confirmed the builtInfo.plisthadFCGitCommitset to the current SHA andCFBundleVersionstill at 272.The script never fails the build. If it can't find a 40-character SHA, it deletes any stale file and
base.xcconfigfalls back tounknown. A clone that never ran the script gets the same fallback.CFBundleVersionis untouched, soSessionAuthenticator.requiresUpgradeand the server'sminBuildNumberbehave as before.App changes
BuildCommit(FlipcashCore) parses the stamp and produces the 10-character label with the*marker.AppMeta.versionFooterassembles the two lines.BuildCommitTestscovers the cut, the marker, unusable stamps, and each footer shape.ReleaseTrackpicks the track. TestFlight and the App Store run the same Release binary, so it reads StoreKit'sAppTransactionenvironment:.sandboxmeans TestFlight. The You screen reads it once when it appears; if StoreKit can't answer, no track is shown.ReleaseTrackTestscovers the mapping.ErrorReporting.initialize()adds the raw stamp (including*) to Bugsnag'sappmetadata tab ascommit.