Unable to add google sign in in ios 9.0

2019-07-12 18:39发布

I had followed all the steps given in developers.google.com.

When I try to do

#import <GoogleSignIn/GoogleSignIn.h>
[GIDSignIn sharedInstance].clientID = kClientID;

Got clientID from my plist file.

But it shows linker errors like

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

thanks in advance.

3条回答
疯言疯语
2楼-- · 2019-07-12 18:43

As per Google documents: https://developers.google.com/identity/sign-in/ios/sdk/, you should do the following:

  1. Include SafariServices.framework and SystemConfiguration.framework to your Target -> Build Phases -> Link Binary with Libraries.

  2. Add "-ObjC" (without quotes) to your Target -> Build Settings -> Other Linker Flags

查看更多
Lonely孤独者°
3楼-- · 2019-07-12 18:55

I had above mentioned issue.

Just needs to add "SafariServices.framework" to your project which is available in iOS 9.

enter image description here

查看更多
家丑人穷心不美
4楼-- · 2019-07-12 19:03

So far I tried I am unable to complete this with google sign in.

So I have used Google-Plus sign in mechanism to get the user details.

Please refer to this

https://developers.google.com/+/mobile/ios/getting-started

And also now I can share the content and people list/

查看更多
登录 后发表回答