diff --git a/SunHat.xcodeproj/project.pbxproj b/SunHat.xcodeproj/project.pbxproj
index 4bfac31..18a7f7d 100644
--- a/SunHat.xcodeproj/project.pbxproj
+++ b/SunHat.xcodeproj/project.pbxproj
@@ -102,7 +102,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "# Only runs during Release (Archive uses Release); skipped in Debug.\n# Reads buildnumber.txt, increments by 1, writes the new number back\n# to the file AND into the built product's Info.plist. After archiving,\n# commit the updated buildnumber.txt to lock in the number.\nif [ \"$CONFIGURATION\" != \"Release\" ]; then\n exit 0\nfi\n\nBUILD_NUMBER_FILE=\"$SRCROOT/buildnumber.txt\"\nif [ ! -f \"$BUILD_NUMBER_FILE\" ]; then\n echo \"1\" > \"$BUILD_NUMBER_FILE\"\nfi\n\nCURRENT=$(cat \"$BUILD_NUMBER_FILE\")\nBUILD_NUMBER=$((CURRENT + 1))\necho \"$BUILD_NUMBER\" > \"$BUILD_NUMBER_FILE\"\n\nPLIST=\"$TARGET_BUILD_DIR/$INFOPLIST_PATH\"\necho \"[SunHat] Build number: $CURRENT -> $BUILD_NUMBER\"\n/usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $BUILD_NUMBER\" \"$PLIST\"\n";
+ shellScript = "# Build-number policy:\n# - Xcode Cloud (CI_BUILD_NUMBER set): CFBundleVersion = CI_BUILD_NUMBER.\n# Xcode Cloud numbers are per-workflow and strictly increasing, and this\n# workflow is the only one that archives, so App Store Connect uploads\n# never collide. The CI checkout is never modified: buildnumber.txt is a\n# local-only file (gitignored).\n# - Local Release archives: read buildnumber.txt, increment by 1, write the\n# new number back to the file AND into the built product's Info.plist.\n# Local numbers are throwaway; Xcode Cloud is authoritative for uploads.\nif [ \"$CONFIGURATION\" != \"Release\" ]; then\n exit 0\nfi\n\nPLIST=\"$TARGET_BUILD_DIR/$INFOPLIST_PATH\"\n\nif [ -n \"$CI_BUILD_NUMBER\" ]; then\n echo \"[SunHat] Xcode Cloud build: CFBundleVersion = $CI_BUILD_NUMBER\"\n /usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $CI_BUILD_NUMBER\" \"$PLIST\"\n exit 0\nfi\n\nBUILD_NUMBER_FILE=\"$SRCROOT/buildnumber.txt\"\nif [ ! -f \"$BUILD_NUMBER_FILE\" ]; then\n echo \"1\" > \"$BUILD_NUMBER_FILE\"\nfi\n\nCURRENT=$(cat \"$BUILD_NUMBER_FILE\")\nBUILD_NUMBER=$((CURRENT + 1))\necho \"$BUILD_NUMBER\" > \"$BUILD_NUMBER_FILE\"\n\necho \"[SunHat] Build number: $CURRENT -> $BUILD_NUMBER\"\n/usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $BUILD_NUMBER\" \"$PLIST\"\n";
};
/* End PBXShellScriptBuildPhase section */
diff --git a/SunHat.xcodeproj/xcshareddata/xcschemes/SunHatUnitTests.xcscheme b/SunHat.xcodeproj/xcshareddata/xcschemes/SunHatUnitTests.xcscheme
index 9ecfd22..68aa23e 100644
--- a/SunHat.xcodeproj/xcshareddata/xcschemes/SunHatUnitTests.xcscheme
+++ b/SunHat.xcodeproj/xcshareddata/xcschemes/SunHatUnitTests.xcscheme
@@ -52,6 +52,9 @@
ReferencedContainer = "container:SunHat.xcodeproj">
+
+