iOS Google登录不允许用户代理

问题描述 投票:2回答:1

我在objective-c iOS应用程序中集成了google signIn,它工作正常,但现在它给出了这个错误。 enter image description here

这是按下按钮时的signIn代码:

[GIDSignIn sharedInstance].uiDelegate = self;
[GIDSignIn sharedInstance].delegate = self;
[[GIDSignIn sharedInstance] setScopes:@[@"https://www.googleapis.com/auth/contacts.readonly",@"https://www.google.com/m8/feeds/"]];
[[GIDSignIn sharedInstance] signIn];
ios objective-c google-signin
1个回答
0
投票

转换为Objective-C后尝试此操作

 GIDSignIn.sharedInstance().delegate = self

 GIDSignIn.sharedInstance().uiDelegate = self

 GIDSignIn.sharedInstance().scopes.append("https://www.googleapis.com/auth/plus.stream.read")

 GIDSignIn.sharedInstance().scopes.append("https://www.googleapis.com/auth/plus.me")

 GIDSignIn.sharedInstance().hasAuthInKeychain()

在每次登录前尝试注销

 [[GIDSignIn sharedInstance] signOut];

 [[GIDSignIn sharedInstance] signIn];
© www.soinside.com 2019 - 2024. All rights reserved.