Actually I integrated google-drive-sdk with my ios app. I can able to to upload specified file on google drive through google-drive-sdk for iOS. Additionally I want to provide a functionality for choosing a folder from available folder in which user want to upload that file on Google Drive.
So, I found how to list all files of Google Drive but unable to find how to list of all folders of Google Drive.
I also went through whole API reference on Google Developer site but didn't found any solution about it.
I had found somewhere that using below code folder listing can be done so tried it but it didn't work.
GTLQueryDrive *query = [GTLQueryDrive queryForFilesList];
query.q = @"mimeType='application/vnd.google-apps.folder' and trashed=false";
[self.driveService executeQuery:query completionHandler:^(GTLServiceTicket *ticket,
GTLDriveFileList *files,
NSError *error) {
if (error == nil) {
NSLog(@"Array of folder: %@", files.items);
} else {
NSLog(@"An error occurred: %@", error);
}
}];
So is there any solution for getting list of folders from Google Drive using google-drive-sdk?