title: how to work with spreadsheets using Google Drive API on iOS
body: <p>I'm trying to write an iPhone app that stores its database in a Google spreadsheet. I followed the DrEdit example <a href="https://developers.google.com/drive/examples/objectivec" rel="noreferrer">here</a> which uses the Drive API to read/write plain text files to Google Drive. I'm trying to modify the example app to work with spreadsheets instead. I was able to upload a csv file and ask Google to convert it. However, what I really want is to directly work with mimeType: "application/vnd.google-apps.spreadsheet". I'm very new at this and it would be extremely helpful if someone could point me to an example. For starters, I'd like to achieve something like the following</p>
  
  <pre><code>- (void)uploadSpreadSheetWithThreeCells {
  GTLUploadParameters *uploadParameters = nil;
  
  NSString *data = @"cell1,cell2,cell3";
  
  NSData *spreadSheetContent = nil;
  
  /* 
    How to initialize spreadSheetContent with data? 
  */
  
  [GTLUploadParameters uploadParametersWithData:spreadSheetContent
        MIMEType:@"application/vnd.google-apps.spreadsheet"];
  
  GTLQueryDrive *query = [GTLQueryDrive queryForFilesInsertWithObject:self.driveFile
                                          uploadParameters:uploadParameters];
  
  [self.driveService executeQuery:query completionHandler:nil];
  }
  </code></pre>
  
  <p>Also, is Google Drive API the right thing to use? Ultimately, I want to have the ability to update selected cells of a spreadsheet instead of uploading an entire document. I found some other options such as the gdata api and spreadsheet api, but it seems that Drive API is the newest and it's supposed to contain the functionalities of the other two? </p>
  
  <p>Thanks in advance!</p>