我正在尝试从iOS中的谷歌驱动器文件下载并在以下
中收到错误GTLServiceDrive* googleDriveService = [[GTLServiceDrive alloc] init];
NSString *urlTest = [NSString stringWithFormat:@"https://www.googleapis.com/drive/v3/files/%@?alt=media",itemIdentifier[indexPath.row]];
GTMSessionFetcher *fetcherTest = [googleDriveService.fetcherService fetcherWithURLString:urlTest];
[fetcherTest beginFetchWithCompletionHandler:^(NSData *data, NSError *error) {
if (error == nil) {
NSLog(@"Retrieved file content");
NSLog(@"File size is : %.2f MB",(float)data.length/1024.0f/1024.0f);
// Do something with data
} else {
NSLog(@"error: %@", [error localizedDescription]);
}
}];
错误:无法完成操作。 (com.google.HTTPStatus 错误403。)