ci: Xcode Cloud build numbers and unit-test scheme storefront - #10
Merged
Merged
Conversation
- When CI_BUILD_NUMBER is set (Xcode Cloud), the Release build phase writes it to CFBundleVersion and leaves the checkout untouched - buildnumber.txt is local-only (gitignored), so fresh CI clones would otherwise always produce build 2 and collide on App Store Connect upload; local Release archives keep the existing increment-from-file behavior - Xcode Cloud hosts the single archiving workflow, so per-workflow CI_BUILD_NUMBER values stay unique in App Store Connect
SunHatUnitTests' TestAction had no StoreKitConfigurationFileReference, so once feature/ads-and-iap merges, StoreManagerStoreKitTests would run storefront-less and fail on PR validation. Mirror the SunHat scheme's reference so both shared schemes test against the same local storefront. No behavior change for the current unit suite (no StoreKit tests on main yet); verified: 298 tests / 60 suites pass through this scheme.
weskcode
added a commit
that referenced
this pull request
Sep 6, 2026
* ci: stamp Xcode Cloud build numbers into Release archives - When CI_BUILD_NUMBER is set (Xcode Cloud), the Release build phase writes it to CFBundleVersion and leaves the checkout untouched - buildnumber.txt is local-only (gitignored), so fresh CI clones would otherwise always produce build 2 and collide on App Store Connect upload; local Release archives keep the existing increment-from-file behavior - Xcode Cloud hosts the single archiving workflow, so per-workflow CI_BUILD_NUMBER values stay unique in App Store Connect * ci: attach the StoreKit-Testing storefront to the unit-test scheme SunHatUnitTests' TestAction had no StoreKitConfigurationFileReference, so once feature/ads-and-iap merges, StoreManagerStoreKitTests would run storefront-less and fail on PR validation. Mirror the SunHat scheme's reference so both shared schemes test against the same local storefront. No behavior change for the current unit suite (no StoreKit tests on main yet); verified: 298 tests / 60 suites pass through this scheme.
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.
Summary
Repository-side setup for Xcode Cloud.
CFBundleVersionwith Xcode Cloud'sCI_BUILD_NUMBERwhen present.buildnumber.txtis local-only (gitignored), so fresh CI clones previously always produced build 2 — guaranteeing App Store Connect upload collisions. Local Release archives keep the existing increment-from-file behavior; the CI checkout is never modified.SunHat.storekittoSunHatUnitTests' TestAction so PR validation keeps working after the monetization branch merges (StoreManagerStoreKitTestsrequires a StoreKit-Testing storefront).Verification
plutil -lint+xcodebuild -listcleanCI_BUILD_NUMBER=997Release archive → plistCFBundleVersion=997,buildnumber.txtuntouched; plain archive → 14→15 (original behavior), file restoredSunHatUnitTestsscheme; all 28 UI tests pass viaSunHatschemeFollow-up (manual, outside the repo)
Create the two Xcode Cloud workflows (PR validation →
SunHatUnitTestsTest; main →SunHatTest + Archive + TestFlight internal) and complete App Store Connect onboarding. Details are in the session report; workflows cannot be defined in-repo.