Fix Release build for App Store deployment — manual signing and #if DEBUG guard

- Switch Release config to manual signing (Apple Distribution, SportsTime Dist profile)
- Wrap SyncStatusMonitor.syncFailed call in #if DEBUG to fix Release compilation
- Add deploy instructions to CLAUDE.md

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Trey T
2026-03-27 10:33:28 -05:00
parent 741924f6fc
commit 65fbb596a8
3 changed files with 45 additions and 3 deletions

View File

@@ -25,6 +25,46 @@ cd Scripts && pip install -r requirements.txt
python scrape_schedules.py --sport all --season 2026
```
## Deploy to App Store Connect
Use the `/deploy` command (e.g., `/deploy main`) to archive and upload to TestFlight. If `/deploy` is unavailable, follow these steps manually:
```bash
# 1. Source secrets
source ~/Desktop/code/tony-scripts/tony.env
# 2. Checkout and pull
cd SportsTime
git fetch origin && git checkout <branch> && git pull origin <branch>
# 3. Unlock keychain for headless signing
security unlock-keychain -p "$KEYCHAIN_PASSWORD" ~/Library/Keychains/login.keychain-db
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$KEYCHAIN_PASSWORD" ~/Library/Keychains/login.keychain-db
# 4. Archive (do NOT override build number — App Store Connect auto-increments)
xcodebuild archive \
-project SportsTime.xcodeproj \
-scheme SportsTime \
-archivePath ~/reports/SportsTime.xcarchive \
-destination 'generic/platform=iOS' \
-allowProvisioningUpdates
# 6. Export and upload directly (auto-increments build number)
xcodebuild -exportArchive \
-archivePath ~/reports/SportsTime.xcarchive \
-exportPath ~/reports/export \
-exportOptionsPlist ~/Desktop/code/tony-scripts/ExportOptions-SportsTime-Upload.plist \
-allowProvisioningUpdates \
-authenticationKeyPath ~/.appstoreconnect/private_keys/AuthKey_${ASC_KEY_ID}.p8 \
-authenticationKeyID "$ASC_KEY_ID" \
-authenticationKeyIssuerID "$ASC_ISSUER_ID"
# 8. Clean up
rm -rf ~/reports/SportsTime.xcarchive ~/reports/export
```
**Always confirm with the user before deploying.** Report version, build number, and commit before starting the archive.
## Architecture Overview
- **Pattern**: Clean MVVM with feature-based modules

View File

@@ -345,8 +345,8 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
CODE_SIGN_ENTITLEMENTS = SportsTime/SportsTime.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CODE_SIGN_IDENTITY = "Apple Distribution: 88Oak LLC (QND55P4443)";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = QND55P4443;
ENABLE_PREVIEWS = YES;
@@ -365,7 +365,7 @@
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.88oakapps.SportsTime;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
PROVISIONING_PROFILE_SPECIFIER = "SportsTime Dist";
STRING_CATALOG_GENERATE_SYMBOLS = YES;
SWIFT_APPROACHABLE_CONCURRENCY = YES;
SWIFT_EMIT_LOC_STRINGS = YES;

View File

@@ -371,7 +371,9 @@ final class CanonicalSyncService {
SyncLogger.shared.log("⚠️ [SYNC] Failed to save error state: \(saveError.localizedDescription)")
}
#if DEBUG
SyncStatusMonitor.shared.syncFailed(error: error)
#endif
throw error
}