I integrated Google drive sdk with my iOS app. But I do not know how to upload a file to Google drive specific folder.
Here the code am using to upload the file. Bu
GTLServiceTicket *_editFileListTicket;
GTLServiceDrive *service = self.driveService;
GTLDriveFile *folderObj = [GTLDriveFile object];
folderObj.title = [NSString stringWithFormat:@"%@", title];
folderObj.mimeType = @"application/vnd.google-apps.folder";
GTLQueryDrive *query = [GTLQueryDrive queryForFilesInsertWithObject:folderObj
uploadParameters:nil];
_editFileListTicket = [service executeQuery:query
completionHandler:^(GTLServiceTicket *ticket,
GTLDriveFile *folderItem,
NSError *error) {
if (error == nil)
{
UIAlertView *alert=[[UIAlertView alloc] initWithTitle:nil message:@"Created" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil, nil];
[alert show];
}
else
{
NSLog(@"error");
}
}];