Unable to add google sign in in ios 9.0

自古美人都是妖i 提交于 2019-12-11 03:49:19

问题


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.


回答1:


I had above mentioned issue.

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




回答2:


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




回答3:


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/



来源:https://stackoverflow.com/questions/32949700/unable-to-add-google-sign-in-in-ios-9-0

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