fix: restore edu.stanford WKCompanionAppBundleIdentifier for Release build#215
Conversation
- Add finalizeOpenActions() to close pending "Opened X" actions when app backgrounds, fixing zero-duration bug when app is killed mid-game - Move reset() logic to UIApplication.willEnterForegroundNotification observer on ActivityLogEntry (synchronous, fires before SwiftUI views) to avoid race condition with async saveLog on background - Add didBecomeActiveNotification handler in ActivityLogBaseView with isVisible guard to re-log current view on resume when onAppear does not fire reliably - Add Home view logging via ActivityLogBaseView wrapper - Add Encodable.toJSON() debug utility in BalanceExtensions - Fix WKCompanionAppBundleIdentifier for local device signing
…model Replace fragile "Opened X" / "Closed X" string-matching with a clean push(viewName:) + finalizePending() stack model: - push() finalizes previous pending entry then opens a new one - finalizePending() closes current entry with correct duration - onDisappear only finalizes if pendingEntry matches view (guards against forward-nav double-finalize since onAppear fires first) - ActivityLogEntry observes willEnterForegroundNotification directly (synchronous, before SwiftUI views) to guarantee reset fires before any onAppear on resume - ActivityLogBaseView uses didBecomeActiveNotification + isVisible guard to re-push current view when onAppear does not fire on resume - Home ActivityLogBaseView moved inside NavigationStack root so onAppear/onDisappear fire correctly on forward/back navigation - Rename actions → entries (CodingKeys maps to "actions" for backwards compatibility with existing user data) - addActionButton renamed to addButtonEvent for clarity - Coins eligibility extracted to Set<String> replacing long if-chain - ProfileView share buttons do fresh file load on tap (single source of truth); ShareLink replaced with Button + UIActivityViewController - SpotifyViewController updated to new push/finalizePending API
…me-session-duration-logging
…me-session-duration-logging
There was a problem hiding this comment.
Pull request overview
Restores the watch app’s WKCompanionAppBundleIdentifier for Release builds so it matches the parent iOS app’s CFBundleIdentifier, resolving the App Store Connect/TestFlight Invalid WKCompanionAppBundleIdentifier (409) upload failure while keeping the local-development bundle ID for Debug builds.
Changes:
- Update
INFOPLIST_KEY_WKCompanionAppBundleIdentifierfor the Watch app Release configuration toedu.stanford.cs342.2023.balance. - Preserve the existing Debug configuration value (
com.celteeka.cs342.2023.balance) for local device development.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #215 +/- ##
=====================================
Coverage 5.23% 5.23%
=====================================
Files 130 130
Lines 2142 2142
=====================================
Hits 112 112
Misses 2030 2030 Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
Summary
Invalid WKCompanionAppBundleIdentifier(409)edu.stanford.cs342.2023.balanceto match the parent app'sCFBundleIdentifiercom.celteeka.cs342.2023.balancefor local device developmentRoot cause
A previous commit set
WKCompanionAppBundleIdentifiertocom.celteekain both Debug and Release configs to fix local device signing. Release should always match the Stanford bundle ID expected by App Store Connect.Test plan
🤖 Generated with Claude Code