Listando todo o conteúdo da pasta do Google Drive
Oi eu integrei o Google Dive com meu aplicativo usando o código de exemplo do Dr. Edit do Google Drive. Mas não consigo visualizar todos os arquivos armazenados em minha conta do Google Drive.
// Eu tentei isso
-(void)getFileListFromSpecifiedParentFolder
{
GTLQueryDrive *query2 = [GTLQueryDrive queryForChildrenListWithFolderId:@"root"];
query2.maxResults = 1000;
[self.driveService executeQuery:query2
completionHandler:^(GTLServiceTicket *ticket,
GTLDriveChildList *children, NSError *error)
{
NSLog(@"\nGoogle Drive: file count in the folder: %d", children.items.count);
if (!children.items.count)
{
return ;
}
if (error == nil)
{
for (GTLDriveChildReference *child in children)
{
GTLQuery *query = [GTLQueryDrive queryForFilesGetWithFileId:child.identifier];
[self.driveService executeQuery:query completionHandler:^(GTLServiceTicket *ticket,
GTLDriveFile *file,
NSError *error)
{
NSLog(@"\nfile name = %@", file.originalFilename);}];
}
}
}];
}
// Quero exibir todo o conteúdo no NSLog ...