问题:
Uncaught exception: NSInvalidArgumentException: +[FIRApp registerLibrary:withVersion:]: unrecognized selector sent to class 0x101b94b98
我尝试了很多解决方案,但没有任何效果。我来详细介绍一下
创建了Podfile
:
$ cd your-project directory
$ pod init
我的Podfile
就是这样的
# Uncomment the next line to define a global platform for your project # platform :ios, '9.0' target 'Unity-iPhone' do # Uncomment the next line if you're using Swift or would like to use dynamic frameworks # use_frameworks! # Pods for Unity-iPhone pod 'GoogleInterchangeUtilities' pod 'GoogleSymbolUtilities' pod 'GoogleToolboxForMac' pod 'Firebase' pod 'Firebase/Core' pod 'Firebase/Analytics' pod 'Firebase/Auth' pod 'Firebase/Storage' pod 'Firebase/Database' target 'Unity-iPhone Tests' do inherit! :search_paths # Pods for testing end end
ObjC
的目标构建设置中添加了linker flag
Other Linker Settings
Arguments Passed On Launch
部分,添加了-FIRAnalyticsDebugEnabled
AdSupport.framework
部分Linked Frameworks and Libraries
.xcworkspace
进行构建,而不是.xcodeproj
那么,告诉我我做错了什么?
答案 0 :(得分:0)
通过按照this link (Stack Overflow)
中提供的步骤更新pod
,解决了主要问题
之后只需执行以下步骤即可使XCode项目正常工作,因为pod init
和pod install
由Unity完成:
Xcode Workspace - Add Cocoapods to the Xcode workspace
iOS Resolver Settings
,从Unity构建XCode
.xcworkspace
,而不是.xcodeproj
Other Linker Flags
-ObjC
target's build settings
AdSupport.framework
部分添加Linked Frameworks and Libraries