From fcd398b11f1af48c8391e4e4f037ea867b4bdef8 Mon Sep 17 00:00:00 2001 From: Mike Hardy Date: Thu, 30 Jul 2026 08:07:28 -0500 Subject: [PATCH] spm: add .macCatalyst to FirebasePerformance and FirebaseInAppMessaging targets Under SPM, the Wrap-based targets for FirebasePerformance and FirebaseInAppMessaging gate their real product dependencies with `.when(platforms: [.iOS, ...])` that omits `.macCatalyst`. On Mac Catalyst, SPM therefore only links the `SwiftPM-PlatformExclude/*Wrap` dummies (`FirebasePerformanceTarget.o` / `FirebaseInAppMessagingTarget.o`) and never compiles the real modules. This is speculative / discussion-only: draft PR asking whether the Catalyst exclusion under SPM was intentional. CocoaPods consumers with Mac Catalyst apps have historically been able to compile and link these products via the iOS podspec slice through the `Firebase/Firebase.h` umbrella, so the current SPM behavior is a divergence from that historical path. Package.swift already declares `.macCatalyst(.v15)` in `Package.platforms` and uses `.macCatalyst` alongside `.iOS` / `.tvOS` / `.macOS` for many other targets, so this change follows existing style. Source-level compile fitness on Catalyst is not verified by this change: FirebasePerformance's Objective-C sources already special-case `TARGET_OS_MACCATALYST` for CoreTelephony and FirebaseInAppMessaging's sources gate on `TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION` (TARGET_OS_IOS is 1 under Catalyst), but Google CI is the ground truth. App Distribution is intentionally left iOS-only. Consumer context: https://github.com/invertase/react-native-firebase/pull/8933 --- Package.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Package.swift b/Package.swift index 0d5507d9759..a9f556d2225 100644 --- a/Package.swift +++ b/Package.swift @@ -747,7 +747,8 @@ let package = Package( .target( name: "FirebaseInAppMessagingTarget", dependencies: [ - .target(name: "FirebaseInAppMessaging", condition: .when(platforms: [.iOS, .tvOS])), + .target(name: "FirebaseInAppMessaging", + condition: .when(platforms: [.iOS, .tvOS, .macCatalyst])), ], path: "SwiftPM-PlatformExclude/FirebaseInAppMessagingWrap" ), @@ -883,7 +884,7 @@ let package = Package( .target( name: "FirebasePerformanceTarget", dependencies: [.target(name: "FirebasePerformance", - condition: .when(platforms: [.iOS, .tvOS, .visionOS]))], + condition: .when(platforms: [.iOS, .tvOS, .visionOS, .macCatalyst]))], path: "SwiftPM-PlatformExclude/FirebasePerformanceWrap" ), .target(