我添加到我的 pod 文件中
pod 'google-plus-ios-sdk', '1.4.1'
我做了一个
pod update
我导入了
#import <GooglePlus/GooglePlus.h>
但如果我尝试
[GPPSignIn sharedInstance].clientID = kClientID;
我从链接器得到这个错误:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_GPPSignIn", referenced from:
objc-class-ref in SDSocialManager.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
最佳答案
根据我的经验,链接器错误通常不会导致“一个解决方案适合所有人”,但我能够通过将 ${inherited}
添加到 Other Linker 来自己解决这个问题build设置(项目目标)中的标记
。
也许,由于没有这个标签,我没有继承 GPPSignIn
所需的一些静态库。
干杯!
关于ios - GooglePlus 与 CocoaPods 链接错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19658205/