【IT专家】在验证方法之后,不调用auth。 | 您所在的位置:网站首页 › auth验证 › 【IT专家】在验证方法之后,不调用auth。 |
本文由我司收集整编,推荐下载,如有疑问,请与我司联系
在验证方法之后,不调用
auth 。
在验证方法之后,不调用
auth 。 [ 英 ]finishedWithAuth not called after authenticate method I have already set the clientID ,scope and then on button click in MyViewController ,i am calling method login from LoginCLass which works but after [signIn authenticate] ,the delegate implementation finishedWithAuth is not getting called.I have set .h file as
我已经设置了
clientID ,作用域,然后在
MyViewController 中点击按钮,我正在
调用
LoginCLass 中的方法
login ,它可以工作,但是在 [signIn authenticate] 之后,委
托实现
finishedWithAuth 不会被调用。我将 .h 文件设置为
- (NSError *) login NSLog(@”In
login :%@ %@ %@”,kClientId,scopes,actions);
if(!kClientId|| !scopes) NSLog(@”Either client ID Or scope is not specified!! “); NSError *err=[[NSError alloc]initWithDomain:@”Scope not specified” code:0 userInfo:nil]; return err; else NSLog(@”Client
ID and Scope are set.”);
GPPSignIn *signIn = [GPPSignIn sharedInstance]; signIn.delegate = self; signIn.shouldFetchGooglePlusUser = YES; [signIn authenticate]; [signIn trySilentAuthentication]; return nil;- (void)finishedWithAuth:(GTMOAuth2Authentication *)auth error:(NSError *)error NSLog(@”Received error %@ and auth object %@”,error, auth); and also in AppDelegate i am adding the code
在
AppDelegate 中,我添加了代码。
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation { return [GPPURLHandler handleURL:url sourceApplication:sourceApplication annotation:annotation]; I have checked the bundle ID and URL Types to be specified,they are set same as bundle ID from Google API access.
我检查了要指定的
bundle ID 和
URL 类型,它们与谷歌
API access 中的
bundle ID 设置相同。 |
CopyRight 2018-2019 实验室设备网 版权所有 |