我想通过Gmail登录我的应用程序。我使用这段代码,他们为我打开gmail。他们显示屏幕后,不要重定向我的应用程序。请帮助我在iOS中更新。在此屏幕上有代码,并写入复制这些代码,切换到我们的应用程序,并粘贴here.Or是有Gmail登录任何简单的方法,而不是最后一行的Gmail登录iOS
static NSString *const kKeychainItemName = @"OAuth2 Sample: Google+";
NSString *kMyClientID = @"7-s.apps.googleusercontent.com"; // pre-assigned by service
NSString *kMyClientSecret = @"qD-L"; // pre-assigned by service
NSString *scope = @"https://www.googleapis.com/auth/plus.me"; // scope for Google+ API
GTMOAuth2ViewControllerTouch *viewController;
viewController = [[GTMOAuth2ViewControllerTouch alloc] initWithScope:scope
clientID:kMyClientID
clientSecret:kMyClientSecret
keychainItemName:kKeychainItemName
delegate:self
finishedSelector:@selector(viewController:
finishedWithAuth:error:)] ;
[self presentViewController:viewController animated:YES completion:nil];