RawMean
RawMean

Reputation: 8735

FIRAnalyticsConnector: building for Mac Catalyst, but linking in object file built for iOS Simulator

When trying to build for Mac using Catalyst, I get the following build error:

FIRAnalyticsConnector(FIRConnectorUtils_77ff1e12be6740765c87f1be0d421683.o), building for Mac Catalyst, but linking in object file built for iOS Simulator

The project builds fine for iOS andiPadOS.

Upvotes: 26

Views: 4882

Answers (1)

RawMean
RawMean

Reputation: 8735

The problem was related to the difference between Firebase/Core and FirebaseCore. The first is a subspec of the Firebase pod that depends on FirebaseAnalytics. The second is only the FirebaseCore pod. Only the latter should be used for macOS.

Solution: For Catalyst, set use FirebaseCore in the PodFile

Update: Here is the PodFile:

platform :ios, '11.0'

def reusepods
end

target 'BatteryCompare' do
    use_frameworks!

#    pod 'Firebase/Core'
    pod 'FirebaseCore'
    pod 'Firebase/Database'
    pod 'Firebase/Auth'

end

Upvotes: 15

Related Questions