commit 0b2b30ef128811ee8ba95995670cffce96008e58
parent 4843509c8f5639e8ee7a3f9f8882c959e7f96f7f
Author: Michael Camilleri <[email protected]>
Date: Sun, 17 May 2026 12:44:32 +0900
Update script to archive into the Xcode library
Prior to this commit, the publish-ios.sh script archived to a fixed
/tmp/Crossmate-latest.xcarchive. Every invocation overwrote it, with /tmp
itself being cleared on reboot. The exported IPA is stripped and uploaded as a
bare .ipa via iTMSTransporter, so no dSYM reaches App Store Connect either. Net
effect: once a build is superseded its dSYM is gone everywhere, and its
TestFlight crashes can no longer be symbolicated.
The archive now goes to a unique per-build path inside the Xcode Archives
library (~/Library/Developer/Xcode/Archives/<date>/Crossmate <stamp>
.xcarchive), with one timestamp driving both the date directory and the
archive name so they can't disagree across a midnight boundary. Organizer
watches that directory, so every build is retained and indexed and its
crashes symbolicate automatically against the matching dSYM.
Co-Authored-By: Claude Opus 4.7 <[email protected]>
Diffstat:
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/Scripts/publish-ios.sh b/Scripts/publish-ios.sh
@@ -12,7 +12,15 @@ fi
source "$SECRETS"
SCHEME="Crossmate"
-ARCHIVE_PATH="/tmp/Crossmate-latest.xcarchive"
+# Archive into the Xcode Archives library at a unique per-build path so
+# Organizer indexes every build and TestFlight crashes symbolicate
+# automatically. A fixed/volatile path (e.g. /tmp) makes each publish
+# overwrite the previous build's dSYM, leaving superseded builds' crashes
+# permanently unsymbolicatable. One timestamp drives both the date dir
+# and the archive name so they can't disagree across a midnight boundary.
+ARCHIVE_STAMP="$(date '+%Y-%m-%d %H.%M.%S')"
+ARCHIVE_DIR="$HOME/Library/Developer/Xcode/Archives/${ARCHIVE_STAMP%% *}"
+ARCHIVE_PATH="$ARCHIVE_DIR/$SCHEME $ARCHIVE_STAMP.xcarchive"
EXPORT_PATH="/tmp/Crossmate-export"
EXPORT_PLIST="/tmp/Crossmate-ExportOptions.plist"
IPA_PATH="$EXPORT_PATH/Crossmate.ipa"
@@ -55,7 +63,8 @@ cleanup_keychain() {
}
trap cleanup_keychain EXIT
-echo "==> Archiving $SCHEME..."
+mkdir -p "$ARCHIVE_DIR"
+echo "==> Archiving $SCHEME to $ARCHIVE_PATH..."
xcodebuild \
-scheme "$SCHEME" \
-project Crossmate.xcodeproj \