FIRAnalyticsConnector:为Mac Catalyst构建,但链接为iOS Simulator构建的目标文件 [英] FIRAnalyticsConnector: building for Mac Catalyst, but linking in object file built for iOS Simulator
问题描述
当尝试使用Catalyst为Mac构建时,出现以下构建错误:
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
该项目在iOS和iPadOS上运行良好.
The project builds fine for iOS andiPadOS.
推荐答案
问题与Firebase/Core和FirebaseCore之间的差异有关.第一个是依赖于FirebaseAnalytics的Firebase pod的子规格.第二个只是FirebaseCore窗格.对于macOS,仅应使用后者.
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.
解决方案:
对于Catalyst,在PodFile中设置使用FirebaseCore
Solution:
For Catalyst, set use FirebaseCore
in the PodFile
更新:这是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
这篇关于FIRAnalyticsConnector:为Mac Catalyst构建,但链接为iOS Simulator构建的目标文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!