问题
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