为Xcode项目创建单元测试会导致错误:显示最近的消息:-1:未定义的符号:_OBJC_CLASS _ $ _ FBSDKCodelessIndexer

时间:2019-05-28 03:01:52

标签: ios swift iphone xcode cocoapods

将其添加到我的pods文件中(用于单元测试)

target 'MY_PROJECT_TITLE_Tests' do
inherit! :search_paths
pod 'Firebase'
end

编译时出现错误:

Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_FBSDKCodelessIndexer", referenced from:
  objc-class-ref in FBSDKMarketingKit(FBSDKButtonIndexer.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see 
invocation)

在上述podfile的“ pod安装”更改之前没有错误。为什么会这样/是否有修复程序?谢谢。

1 个答案:

答案 0 :(得分:1)

很可能需要pod update

Firebase的旧版本和FBSDK之类的How to fix build error with FBSDKLoginKit in Xcode之间可能不兼容