iOS Google Drive SDK Get Sub folder ID -


that I have listed the files in the following code, which is the root, but it does not list any sub-folders root :

  NSString * parentId = @ "root"; GTLQueryDrive * queryDrive = [GTL query drive queryFileList]; QueryDrive.q = [NSString stringWithFormat: @ "Parents '% @' and Trashed = Wrong", Parent ID]; [Self.driveService executeQuery: queryDrive completionHandler: ^ (GTLServiceTicket * ticket, GTLDriveFileList * files, NSError * error) {if (error == null) {NSLog (@ "The number of files:% i", [files.items count] ); NSLog (@ "results are"); // files.items on file for array (file in GTLDriveFile * file) {NSLog ("file title:% @ | id:% @", file.title, file.identifier); }} And {NSLog (@ "An error occurred:% @", error); }}];  

It lists 7 files in this folder, but at the same level as 7 files, I have a sub folder

For example:

root-> file1 root-> file2 ... etc all come back

but the results are not listed in Root-> MyFolder.

Any thoughts?

have to authenticate your app if you only validate your app's files as its scope , you will not see the other files and folders created out of your app

when you certify like this:

  self.gDriveAuthenticationViewController = GTMOAuth2ViewControllerTouch (Scope: kGTLAuthScopeDrive , Client ID: Client ID, Client Secret: Client Secret, Key SymbolEatomName: Keynames, Representative: Self-finished selector: "ViewController: finishedWithAuth: error:")  

Use Scope: instead kGTLAuthScopeDriveFile kGTLAuthScopeDrive


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -