Google Drive SDK for iOS: issue with queries -
i've run issue gtlquerydrive.
callbacks queryforchildrenlistwithfolderid:@"root"
& queryforfileslist
methods return 0 items. nslog(@"files count: %d", files.items.count)
gives me 0.
https://github.com/googledrive/dredit/tree/master/objectivec - i'm using example play drive apis, removed search restriction - query.q = @"mimetype = 'text/plain'";
files.
make sure specify kgtlauthscopedrive. made mistake of using kgtlauthscopedrivefile sample app; restricts scope files created app, while kgtlauthscopedrive gives app access user's files.
also, 'root' query, add @"'root' in parents , trashed=false" youer query.q. example mine looks this:
gtlquerydrive *query;
if ([self isroot]) { query = [gtlquerydrive queryforchildrenlistwithfolderid:@"root"]; query.q = @"'root' in parents , trashed=false"; } else { query = [gtlquerydrive queryforchildrenlistwithfolderid:self.metadata.identifier]; query.q = @"trashed=false"; }
Comments
Post a Comment