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

前提是你 提交于 2020-01-14 06:59:06

问题


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.


回答1:


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


来源:https://stackoverflow.com/questions/57666155/firanalyticsconnector-building-for-mac-catalyst-but-linking-in-object-file-bui

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!