我在objective-c iOS应用程序中集成了google signIn,它工作正常,但现在它给出了这个错误。
这是按下按钮时的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];
转换为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];