Monday 15 March 2010

objective c - Insert file into appdata folder -


I'm developing a Mac application and want to store files in Google Drive. The file must be hidden from the user. Therefore saving my choice to the "appadata" folder is using the file uploading file to insert the file into the "appadata" folder but when I insert the file the user is showing. It's not hidden.

  1. So please tell me what are the changes needed to upload the file to the "Apeda" private folder?
  2. Do I need to create an "appadata" folder for the first time?

    After making the following changes to the successfully uploaded file in the app data folder: < / P>

    1. To select modified API scope:

      GTMOAuth2WindowController * windowController = [GTMOAuth2WindowController ControllerWithScope: @ "https: //www.googleapis. Com / auth / drive.appdata "Client ID: Client ID Client Secret: Client Secret Key Name Name: KKChen Item Name Bundle: Framework Bundle];

      2. Viewing original file references. Here is the 'AppData' folder parent:

        GTL query * query = [gtlquaiddriver queryfreezefilterfile id: @ "appadata"]; [Service Execution: Query Completion Handler: ^ (GTLS erviceTicket * Ticket, GTLRRAFile * BasicFile, NSERR * Error)) / / Save parent file for future reference;   

      3. Open the file data folder while uploading the application file folder. Using the original file reference contained in the previous step

        GTLDriveParentReference * parentRef = [GTLDriveParentReference object]; ParentRef.identifier = parentfile.identifier; FileToUpload.labels.hidden = @Yes; FileToUpload.parents = [Object with NSArray array: parentRef, zero];    

No comments:

Post a Comment