Files
Flights/Flights.xcodeproj
Trey T f40b02f68d Fix launch crash: drop CloudKit init, lazy Wallet, revert plist
Three changes that together stop the crash-on-launch the previous
build hit on device:

1. FlightsApp: stop attempting `cloudKitDatabase: .private(...)`
   when the iCloud entitlement isn't set — SwiftData's
   ModelContainer init can fatalError validating the cap (not just
   throw), so try? doesn't save us. Go straight to local config,
   with an in-memory fallback if the disk store is incompatible
   with the current schema.

2. WalletPassObserver: don't touch PKPassLibrary in init().
   `@StateObject` accesses .shared at view body time, which on
   first launch can race against PassKit subsystem init. Move the
   library bring-up into an explicit start() called from
   RootView's .task.

3. Flights app target Info.plist: revert from manual
   INFOPLIST_FILE back to GENERATE_INFOPLIST_FILE = YES (with the
   INFOPLIST_KEY_* entries restored). The manual plist I wrote
   was missing some auto-generated keys the device launch path
   needs. Loses the custom URL scheme — `.onOpenURL` handler
   stays in code but won't fire until we re-add the scheme via a
   manual plist that's been verified end-to-end.

Verified launch on iPhone 17 Pro simulator — scene becomes key
window, no fatalError. The earlier on-device crash was almost
certainly the CloudKit init.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-27 10:21:47 -05:00
..