3

I run my project for mac with catalyst, I got a below error. for Firebase

Please see below link for pod file.

/Users/ios/Desktop/xxxxxx/Pods/FirebaseAnalytics/Frameworks/FIRAnalyticsConnector.framework/FIRAnalyticsConnector(FIRConnectorUtils_d79571aba36a7d46e5c6ca87a6fec1c1.o), building for Mac Catalyst, but linking in object file built for iOS Simulator, file '/Users/ios/Desktop/xxxxxx/Pods/FirebaseAnalytics/Frameworks/FIRAnalyticsConnector.framework/FIRAnalyticsConnector' for architecture x86_64
Ankur Patel
  • 477
  • 5
  • 19

2 Answers2

2

Remove pod Firebase/Analytics from the Podfile.

Firebase Analytics does not currently support Catalyst. Full details about Firebase support for Catalyst at https://github.com/firebase/firebase-ios-sdk#development-for-catalyst.

Add a thumbs-up to https://github.com/firebase/firebase-ios-sdk/issues/4563 to indicate interest in Analytics support.

In the meantime, a workaround to conditionally add Analytics only for iOS, see https://stackoverflow.com/a/58768815/556617

Paul Beusterien
  • 27,542
  • 6
  • 83
  • 139
0

While Cocoapods is not yet supported, I've been able to install and run Firebase Analytics & Crashlytics in a Mac Catalyst app using Swift Package Manager (documentation here)

  1. In Xcode, install the Firebase libraries by navigating to File > Swift Packages > Add Package Dependency…
  2. In the prompt that appears, select the Firebase GitHub repository: https://github.com/firebase/firebase-ios-sdk.git
  3. Select the desired Frameworks (Analytics, Crashlytics...)
  1. Make sure to add the same frameworks in Build Phases / Link Binary with Libraries of your target.
aramusss
  • 2,391
  • 20
  • 30