Try the search, it's linked to some great forums

Wednesday, March 2, 2016

Writing to Google Sheets from iOS

Here are some links & info about this subject;
Now which to fiddle with???
Here's the place to start - https://developers.google.com/google-apps/spreadsheets/data check out the bottom Update multiple cells with a batch request

Here's a link to a business app using Google sheets - https://www.smartsheet.com/s/spreadsheet-google-apps?s=1&c=61&m=1307&a=56966441227&k=%2Bgoogle%20%2Bspreadsheet&mtp=b&adp=1o2&net=g&dev=c&devm=&plc=&gclid=Cj0KEQiAvJS3BRDd44fjndyii6MBEiQAN4EkPaUBQ6jIKgNS12DkNKJSfZ7zGlXxNGAUPvm_hHQ-NEQaAjmn8P8HAQ

Here's a site that is similar to what we're doing - https://www.badgermapping.com/https://www.badgermapping.com/

Google Drive API method found at - Updating files
GTLQueryDrive *query = [GTLQueryDrive queryForFilesUpdateWithObject:file
                                                             fileId:file.identifier
                                                   uploadParameters:uploadParameters];
 
Google Sheets API - https://developers.google.com/google-apps/spreadsheets/ 
https://developers.google.com/apps-script/guides/sheets#get_started 
 
The Apps Script Execution API is a REST interface that lets a third-party
application call a function defined in an Apps Script project and receive a response. - 
https://developers.google.com/apps-script/guides/rest/https://developers.google.com/apps-script/guides/rest/
 
Google Apps Script - First script - https://developers.google.com/apps-script/overview  
This is the iOS quickstart example - DO IT!! - 
https://developers.google.com/apps-script/guides/rest/quickstart/ios#prerequisites
Step 1: Create the script (name - Apps Script Execution API Quickstart Target)
Step 2: Publish the script for execution (API ID - Mir2lNxwUvDuYxMtwHhqWu00vNRSAENjV
Step 3: Choose a quickstart (iOS Quickstart)
iOS Quickstart
Step 1: Turn on the Google Apps Script Execution (Script Execution API)
bundle ID -  756894447473-0ho4dumd7rgi646hstkvc8p3octk0pqo.apps.googleusercontent.com
Step 2: Download the Google Client Library - In terminal run - 
git clone --recursive https://github.com/google/google-api-objectivec-client.git
Step 3: Prepare the workspace Quickstart.xcworkspace
Step 4: Prepare the project - xxx Can't find the framework to load?? xxx
Step 5: Set up the sample - ?????????
Step 6: Run the project - ?????????
 
YEAH!!! Got it working check out latest GitHub merge  CPL 3/27 
Now need to work on Apps Scripts for modifying a google sheet. Make a script that 
will modify a Sheet from a CSV file of the form Index, ColumnName, Value.  The app 
will create and download this file to your Google Drive.
 
For Sheets App Scripts ref: https://developers.google.com/apps-script/guides/sheets
1) For a quick introduction to using Apps Script with Google Sheets, see the
5-minute quickstart guide for
Macros, Menus, and Custom Functions.
2) Apparently there is a marketPlace for published app; 
https://apps.google.com/marketplace/search/Sheets 
3) Example of what we're doing;
https://apps.google.com/marketplace/app/dbeaalmfgeechbnnibjlbpiobkbinngh
4)AppSheet is doing interesting stuff;
https://www.appsheet.com/ 
 
** READ this WIKI it's IMPORTANT ** The Google APIs Client Library for Objective-C is 
a Cocoa framework that enables developers for Mac OS X and iOS to easily write native 
applications using Google's JSON-RPC APIs. 
https://github.com/google/google-api-objectivec-client/wiki