Skip to content

ci: Xcode Cloud build numbers and unit-test scheme storefront - #10

Merged
weskcode merged 2 commits into
mainfrom
feature/xcode-cloud-ci
Sep 6, 2026
Merged

weskcode merged 2 commits into
mainfrom
feature/xcode-cloud-ci

Conversation

@weskcode

@weskcode weskcode commented Sep 4, 2026

Copy link
Copy Markdown
Owner

Summary

Repository-side setup for Xcode Cloud.

  • Build numbers: the Release-only build phase now stamps CFBundleVersion with Xcode Cloud's CI_BUILD_NUMBER when present. buildnumber.txt is 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.
  • Unit-test scheme: attaches SunHat.storekit to SunHatUnitTests' TestAction so PR validation keeps working after the monetization branch merges (StoreManagerStoreKitTests requires a StoreKit-Testing storefront).

Verification

  • plutil -lint + xcodebuild -list clean
  • CI-path proof: CI_BUILD_NUMBER=997 Release archive → plist CFBundleVersion=997, buildnumber.txt untouched; plain archive → 14→15 (original behavior), file restored
  • 298 unit tests / 60 suites pass via SunHatUnitTests scheme; all 28 UI tests pass via SunHat scheme

Follow-up (manual, outside the repo)

Create the two Xcode Cloud workflows (PR validation → SunHatUnitTests Test; main → SunHat Test + Archive + TestFlight internal) and complete App Store Connect onboarding. Details are in the session report; workflows cannot be defined in-repo.

- 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
weskcode merged commit 6bc8727 into main Sep 6, 2026
1 check passed
@weskcode
weskcode deleted the feature/xcode-cloud-ci branch September 6, 2026 00:00
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant