Build error when building iPad app for UIKitForMac

Viewed 1106

When attempting to build an iPad app for Mac using Catalyst, I get the following error:

FirebaseAnalytics.framework/FirebaseAnalytics(...o),
building for UIKitForMac, but linking in object file built for iOS Simulator,
file '/../FirebaseAnalytics.framework/FirebaseAnalytics' for architecture x86_64

Is this something Google has to fix? The version is FirebaseAnalytics 6.0.1

1 Answers

The Firebase libraries are not yet ported to UIKitForMac / Catalina, so it's best to conditionally compile out the usages like so:

#if !targetEnvironment(UIKitForMac)
...firebase code...
#endif
Related