fix(mobile): build Mac Catalyst from prebuild and pair Handoff with iOS #109

Merged
joshuafhiggins merged 2 commits from t3/fix-catalyst-handoff into main 2026-11-16 22:07:56 -05:00
Owner

Mac Catalyst builds failed after enabling Catalyst (#81 was never compiled for macOS), and Handoff (#74) could not pair iPhone and Mac: the Mac app derived a maccatalyst. bundle ID, so it published an undeclared activity type that didn't match iOS.

Catalyst build (now builds from MAC_CATALYST=1 prebuild alone, no Xcode steps)

  • with-mac-catalyst.js adds a keychain-access-groups entitlement for the app's own group. Without it the Mac app is signed with no profile and macOS rejects expo-secure-store writes, so saving the server address fails.
  • It also raises pod deployment targets to the app's in post_install; pods left at iOS 15.1 map below the macOS minimum Xcode accepts.
  • Dependency patches, only hit because Catalyst compiles Expo modules from source:
    • Reanimated: import AppKit only when UIKit is unavailable (Quickdraw Rect/Point clashed with React's).
    • expo-modules-core: drop a redundant as any Error pattern that crashes Swift 6.4.2.
    • expo-file-system: QLPreviewController.canPreview is unavailable on Catalyst; skip it there and let Quick Look report unsupported files.
    • slider: declare _isSliding as bool to match its protocol; BOOL is signed char on x86_64, which broke universal Release builds.

Handoff

  • Catalyst shares the iOS bundle ID (DERIVE_MACCATALYST_PRODUCT_BUNDLE_IDENTIFIER = NO).
  • app.config.ts declares the one .media activity type per profile; HandoffModule reads it from Info.plist (matched by suffix, since expo-router appends its own type).
  • Scene life cycle: no change needed. ExpoAppSceneDelegate already forwards scene(_:continue:) and cold-start activities to app delegate subscribers; noted in a comment.
  • No configured server now says "Connect to an oTunes server…" instead of "different oTunes server".
  • README updated: no manual Xcode steps, sign both apps with the same team.

Verified: Debug builds (unsigned) for Mac Catalyst and iOS Simulator succeed on Xcode 27.2; built Catalyst app has the iOS bundle ID and the matching activity type. A production archive exports as a universal Developer ID app with a Mac Catalyst provisioning profile and the keychain entitlement, and launches. pnpm typecheck passes.

Not verified: notarization, App Store signing (the App ID needs Mac Catalyst enabled), and Handoff between real devices.

Changes made by Claude Opus 5.5 via Claude Code in T3 Code.

🤖 Generated with Claude Code

Mac Catalyst builds failed after enabling Catalyst (#81 was never compiled for macOS), and Handoff (#74) could not pair iPhone and Mac: the Mac app derived a `maccatalyst.` bundle ID, so it published an undeclared activity type that didn't match iOS. **Catalyst build** (now builds from `MAC_CATALYST=1` prebuild alone, no Xcode steps) - `with-mac-catalyst.js` adds a `keychain-access-groups` entitlement for the app's own group. Without it the Mac app is signed with no profile and macOS rejects expo-secure-store writes, so saving the server address fails. - It also raises pod deployment targets to the app's in `post_install`; pods left at iOS 15.1 map below the macOS minimum Xcode accepts. - Dependency patches, only hit because Catalyst compiles Expo modules from source: - Reanimated: import AppKit only when UIKit is unavailable (Quickdraw `Rect`/`Point` clashed with React's). - expo-modules-core: drop a redundant `as any Error` pattern that crashes Swift 6.4.2. - expo-file-system: `QLPreviewController.canPreview` is unavailable on Catalyst; skip it there and let Quick Look report unsupported files. - slider: declare `_isSliding` as `bool` to match its protocol; `BOOL` is `signed char` on x86_64, which broke universal Release builds. **Handoff** - Catalyst shares the iOS bundle ID (`DERIVE_MACCATALYST_PRODUCT_BUNDLE_IDENTIFIER = NO`). - `app.config.ts` declares the one `.media` activity type per profile; `HandoffModule` reads it from Info.plist (matched by suffix, since expo-router appends its own type). - Scene life cycle: no change needed. `ExpoAppSceneDelegate` already forwards `scene(_:continue:)` and cold-start activities to app delegate subscribers; noted in a comment. - No configured server now says "Connect to an oTunes server…" instead of "different oTunes server". - README updated: no manual Xcode steps, sign both apps with the same team. **Verified**: Debug builds (unsigned) for Mac Catalyst and iOS Simulator succeed on Xcode 27.2; built Catalyst app has the iOS bundle ID and the matching activity type. A production archive exports as a universal Developer ID app with a Mac Catalyst provisioning profile and the keychain entitlement, and launches. `pnpm typecheck` passes. **Not verified**: notarization, App Store signing (the App ID needs Mac Catalyst enabled), and Handoff between real devices. Changes made by Claude Opus 5.5 via Claude Code in T3 Code. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
joshuafhiggins added 1 commit 2026-11-16 21:02:33 -05:00
joshuafhiggins added 1 commit 2026-11-16 21:56:42 -05:00
joshuafhiggins merged commit 882eacfc94 into main 2026-11-16 22:07:56 -05:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: joshuafhiggins/otunes#109