From 30106e5d62edb072d217a31ee1dd6f53d00db237 Mon Sep 17 00:00:00 2001 From: oratis Date: Thu, 2 Jul 2026 00:17:09 +0800 Subject: [PATCH] fix(ios): TestFlight build number must be < 2^32 (date +%s, not %Y%m%d%H%M) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CFBundleVersion components are capped at 2^32-1 (4,294,967,295). The old default `date +%Y%m%d%H%M` produces a 12-digit stamp (~2e11) — 47x over the limit. Apple's transporter ACCEPTS the upload ("EXPORT SUCCEEDED") but processing then silently rejects it (ITMS-90062) and the build never reaches TestFlight — no error surfaced to the uploader. Every timestamp upload was failing this way. Switch to `date +%s` (Unix seconds, ~1.8e9): under 2^32, monotonic, unique per second, valid until 2106. Verified: re-uploaded build 1782922384 with this scheme. Co-Authored-By: Claude Opus 4.8 (1M context) --- packaging/ios-companion/testflight.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/packaging/ios-companion/testflight.sh b/packaging/ios-companion/testflight.sh index 26a1420..81cb711 100755 --- a/packaging/ios-companion/testflight.sh +++ b/packaging/ios-companion/testflight.sh @@ -24,7 +24,12 @@ # ── Optional env ────────────────────────────────────────────────────────── # APPLE_TEAM_ID default 9LH9NBX7P4 # MARKETING_VERSION default: whatever project.yml has -# BUILD_NUMBER default: date +%Y%m%d%H%M (must increase per version) +# BUILD_NUMBER default: date +%s (Unix seconds). MUST be < 2^32 per +# CFBundleVersion component — a %Y%m%d%H%M stamp (12 digits, +# ~2e11) is 47x over the limit, so Apple accepts the upload +# but SILENTLY fails processing (ITMS-90062) and the build +# never reaches TestFlight. `date +%s` (~1.8e9) is monotonic, +# unique per second, and stays valid until 2106. # EXPORT_METHOD default: app-store-connect (use "app-store" on Xcode<16) # # Usage: @@ -41,7 +46,10 @@ export DEVELOPER_DIR="${DEVELOPER_DIR:-/Applications/Xcode.app/Contents/Develope command -v xcodegen >/dev/null || { echo "✗ need xcodegen — brew install xcodegen" >&2; exit 1; } TEAM_ID="${APPLE_TEAM_ID:-9LH9NBX7P4}" -BUILD_NUMBER="${BUILD_NUMBER:-$(date +%Y%m%d%H%M)}" +# Unix seconds: < 2^32 (valid CFBundleVersion), monotonic, unique per second. +# A %Y%m%d%H%M stamp overflows the 2^32-per-component limit → ITMS-90062, upload +# "succeeds" but never appears in TestFlight. +BUILD_NUMBER="${BUILD_NUMBER:-$(date +%s)}" EXPORT_METHOD="${EXPORT_METHOD:-app-store-connect}" # project.yml hard-disables signing for simulator dev builds (CODE_SIGN_IDENTITY=""). # For the archive that empty identity must be overridden, or app-extension targets