Note that there are some explanatory texts on larger screens.

plurals
  1. POiOS Google Drive SDK Integration
    text
    copied!<p>I am integrating google drive SDK in my iPhone app. I am trying to upload file inside a folder by using the following method</p> <pre><code>-(void)uploadFileAtPath:(NSString *)path atIndexid:(int)indexId{ GTLDriveFile *parentRefFile=[driveFilesArray objectAtIndex:indexId]; if ([parentRefFile.mimeType isEqualToString:@"application/vnd.google-apps.folder"]) { NSFileHandle *fileHandle = [NSFileHandle fileHandleForReadingAtPath:path]; NSLog(@"path--str------%@",path); if (fileHandle) { GTLServiceDrive *service = [self createServiceDriveObj]; GTLDriveChildReference *childRef=[GTLDriveChildReference object]; childRef.childLink=path; childRef.kind=@"drive#childReference"; GTLQueryDrive *query = [GTLQueryDrive queryForChildrenInsertWithObject:childRef folderId:parentRefFile.identifier]; ticket= [service executeQuery:query completionHandler:^(GTLServiceTicket *ticket, GTLDriveFile *uploadedFile, NSError *error) { // Callback if (error == nil) { [_delegate didFinishUploadingFileAtPath:path ForTheObject:_delegate]; } else { [_delegate didFailedToUploadFileAtPath:path withError:error ForTheObject:_delegate]; } }]; } else { // Could not read file data. [self displayAlert:@"No Upload File Found" format:@"Path: %@", path]; } } else { [self displayAlert:@"File type you have choosen is not a folder" format:nil]; } </code></pre> <p>}</p> <p>When i call the above method to upload, i am getting the following error message <strong>The operation couldn’t be completed. (Resource metadata required)</strong>. I am not sure what i am missing. If i want to set identifier property of the GTLChildReference object, i am not sure what to set for that property.Please help me</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload