Google API access example


#1

I’m trying to start with a simple NS app that writes some data in a private Google Spreadsheet. I was hoping to find multiple examples of NS projects doing this, but I feel very lonely in my quest after doing some search. I’m not even sure using Google’s js client will work for the whole OAuth2 flow. Any help, link, tip appreciated. Thanks!


#2

Yeah likely the js client will tank without a polyfill if it requires browser api specific things.

Safest bet is to roll up a plugin and use the native apis
https://developers.google.com/sheets/api/quickstart/ios

Plugins are super simple to rollup

Once you have the pod attached in your plugin you can run this to generate Typescript d.ts for the entire thing and not have to guess the JS->ObjC conversion
https://jasssonpet.github.io/generating-typescript-declarations-in-nativescript-for-javascript-coffeescript-code-completion/


#3

Hi Neokyol… I am working on a requirement similar to yours. Could you please share few insights on how you went ahead with the development?
Thanks in advance.