Skip to content

Commit fcd398b

Browse files
committed
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: invertase/react-native-firebase#8933
1 parent 1b40550 commit fcd398b

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Package.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,8 @@ let package = Package(
747747
.target(
748748
name: "FirebaseInAppMessagingTarget",
749749
dependencies: [
750-
.target(name: "FirebaseInAppMessaging", condition: .when(platforms: [.iOS, .tvOS])),
750+
.target(name: "FirebaseInAppMessaging",
751+
condition: .when(platforms: [.iOS, .tvOS, .macCatalyst])),
751752
],
752753
path: "SwiftPM-PlatformExclude/FirebaseInAppMessagingWrap"
753754
),
@@ -883,7 +884,7 @@ let package = Package(
883884
.target(
884885
name: "FirebasePerformanceTarget",
885886
dependencies: [.target(name: "FirebasePerformance",
886-
condition: .when(platforms: [.iOS, .tvOS, .visionOS]))],
887+
condition: .when(platforms: [.iOS, .tvOS, .visionOS, .macCatalyst]))],
887888
path: "SwiftPM-PlatformExclude/FirebasePerformanceWrap"
888889
),
889890
.target(

0 commit comments

Comments
 (0)