使用GIDSignIn.sharedInstance.clientID =时的错误代码 [英] error code when using GIDSignIn.sharedInstance.clientID =
问题描述
我有一个应用程序,该应用程序过去曾使用Auth2
来使用客户端ID和客户端密码登录,但现在我必须使用Google Sign In
I have an app which I used to use Auth2
to sign in using a client Id and client secret but now I have to use Google Sign In
我按照说明进行了操作,但是在构建时出现此错误
I have followed the instructions as I understand them but when I build I get this error
-[__ NSDictionaryI gtm_httpArgumentsString]:无法识别的选择器已发送到实例0x17d49a40
-[__NSDictionaryI gtm_httpArgumentsString]: unrecognized selector sent to instance 0x17d49a40
我已经添加了框架
我已经导入了标题
我用一个单独的GoogleServices-info.plist
CLIENT_ID
和REVERSED_CLIENT_ID
I have added the framework
I have imported the headers
I have made a separate GoogleServices-info.plist
with
CLIENT_ID
and REVERSED_CLIENT_ID
我已将以下代码放入ViewDidLoad
I have put the following code in my ViewDidLoad
GIDSignIn.sharedInstance.delegate = self;
GIDSignIn.sharedInstance.uiDelegate = self;
GIDSignIn.sharedInstance.clientID = @"55240XXXXX13-aduv6ncti03giqt46s3oq4t83plqck10.apps.googleusercontent.com" ;
GIDSignIn.sharedInstance.scopes=@[@"https://www.googleapis.com/auth/plus.login",@"https://www.googleapis.com/auth/plus.me"];
如果我注释掉GIDSignIn.sharedInstance.clientID
,则应用程序的构建就很好,但是当我不这样做时,应用程序会因上述错误而崩溃.
If I comment out the GIDSignIn.sharedInstance.clientID
the app builds just fine but when I don't the app crashes with the above error.
我也链接了库-ObjC
.
有人对如何解决这个问题有任何想法.
Does anyone have any ideas as to how to work this out.
推荐答案
您应导入以下框架:
- AddressBook.framework
- SafariServices.framework
- SystemConfiguration.framework
- libz.tbd
这篇关于使用GIDSignIn.sharedInstance.clientID =时的错误代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!