我正在尝试整合Google Drive Api for IOS。当他们上传或下载他们使用MIME类型文件我测试的示例程序here如何获取Google Drive API IOS文件列表?
DrEdit比如当他们上传文件
[GTLUploadParameters uploadParametersWithData:fileContent MIMEType:@"text/plain"];
当API下载同一个文件,它使用
GTLQueryDrive *query = [GTLQueryDrive queryForFilesList]; query.q = @"mimeType = 'text/plain'";
我可以上传和下载在Dr.Edit
中制作的文件,但是如果我使用网络界面修改或创建文件或使用mac os
的本地驱动器客户端创建文件。这些文件不会显示在我的应用程序中。我尝试了不同的mimeTypes和here的不同搜索参数。但它仅适用于在Dr.Edit
中创建的文件。问题是什么?
是否有其他参数可以帮助我显示Google Drive
中的所有文件。
也许你打错范围:https://开头开发商.google.com/drive/scopes – DavidVdd
是的,你是对的。我改变了(IBAction)authButtonClicked [[GTMOAuth2ViewControllerTouch alloc] initWithScope:从kGTLAuthScopeDriveFile改为kGTLAuthScopeDrive,效果很好。 GTLDriveConstats.m中有常量//授权范围 NSString * const kGTLAuthScopeDrive = @“https://www.googleapis.com/auth/drive”; NSString * const kGTLAuthScopeDriveAppsReadonly = @“https://www.googleapis.com/auth/drive.apps.readonly”; NSString * const kGTLAuthScopeDriveFile = @“https://www.googleapis.com/auth/drive.file”; 等。感谢帮助。 – user1755343