GooglePlus with CocoaPods linking error

末鹿安然 提交于 2019-12-02 02:32:50

问题


I added to my pod file

pod 'google-plus-ios-sdk', '1.4.1'

I did a

pod update

I imported

#import <GooglePlus/GooglePlus.h>

But if i try to

[GPPSignIn sharedInstance].clientID = kClientID; 

I get this error from linker:

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)

回答1:


In my experience linker errors typically don't lead to a "one solution fits all", but I was able to solve this problem myself by adding ${inherited} to Other Linker Flags in Build Settings (Project Target).

Perhaps, by not having this tag, I wasn't inheriting some of the static libraries that were required by GPPSignIn.

Cheers!



来源:https://stackoverflow.com/questions/19658205/googleplus-with-cocoapods-linking-error

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