0
我已成功将Google Drive API与iOS集成,但似乎存在Drive OAuth进程的主要问题:没有按钮可供用户按下以退出ModalViewController
以输入此代码。 ..Google Drive API问题iOS
我已成功将Google Drive API与iOS集成,但似乎存在Drive OAuth进程的主要问题:没有按钮可供用户按下以退出ModalViewController
以输入此代码。 ..Google Drive API问题iOS
谷歌真的是在屁股的绝对的痛苦,这一次。他们在自己的示例代码犯了一个错误:
其他任何人试图做到这一点在未来,添加[viewController dismissViewControllerAnimated:NO completion:nil];
以下方法:
// Handle completion of the authorization process, and updates the Drive service
// with the new credentials.
- (void)viewController:(GTMOAuth2ViewControllerTouch *)viewController
finishedWithAuth:(GTMOAuth2Authentication *)authResult
error:(NSError *)error
{
if (error != nil)
{
[self showAlert:@"Authentication Error" message:error.localizedDescription];
self.driveService.authorizer = nil;
}
else
{
self.driveService.authorizer = authResult;
}
}