macOS & Google Contacts

36 views
Skip to first unread message

SteveC

unread,
Sep 3, 2018, 7:00:28 PM9/3/18
to Google Data APIs Objective-C Client Library Discussion
Folks;

I'm confused about a few things...  Maybe someone can shed some light.

The goal is to build a modern macOS app that interacts with Google Contacts (read & write) - to be sold in the Mac App Store.

Google Contacts still use the XML based library - OK - seems a little odd that after all this time, Contacts is still using the older technology.
Is there any rationale offered for why - or any indication that this will ever change?
Feels strange to startup with something that feels 'old'....

In any case when I download from 'google/google-api-objectivec-client' I get a data-objectivex-client-master folder created which contains LICENSE, 3 markup files(CONTRIBUTING.md, README.md, and ReleaseNotes.md) and 3 folders (Deps, Examples, and Source).  Note the Deps folder contains 2 folders, gtm-oauth2 and gtm-session-fetcher both of which are empty (see below for related problems)

The README encourages one to examine the slides (written 9 years ago and which ends with a 404 on the last slide entitled 'Where do I start?')
it also encourages one to examine the Examples (Contacts examples throws a 32-bit error on launch when using Xcode 9 on High Sierra) and then 27 errors related to building the GData.framework.
  here's one example '/Users/XYZ/Desktop/gdata-objectivec-client-master/Deps/gtm-session-fetcher/Source/GTMSessionUploadFetcher.h: No such file or directory'

So, what I surmise is that the empty Deps folders are indeed problematic but I am uncertain if this the only issue...

How do I supply the necessary contents to these folders, gtm-oauth2 and gtm-session-fetcher?

Is there a step I missed somewhere?  A document I have failed to read?

Are there any modern projects available?

Gotta say - it  feels a little bumpy here at the start....

Thomas Van Lenten

unread,
Sep 4, 2018, 8:14:58 AM9/4/18
to Google Data APIs Objective-C Client Library Discussion
The XML are very old, and most of the server apis have moved on to REST based JSON apis instead.  There were a few that maintain their old XML interfaces because the new JSON ones aren't exact matches of the functionality.  For contacts, checking the docs (https://developers.google.com/contacts/v3/) it seems the People apis (https://developers.google.com/people/) is likely more complete now and a better choice if you don't have to have something specific to the old contacts api.

The Deps folder uses git submodules, you need to do a recursive clone/update in git so it will fetch the modules.  Note, gtm-oauth2 is deprecated, see the notes on that project page for replacement options for authentication.

TVL

Steve Cronin

unread,
Sep 4, 2018, 1:15:28 PM9/4/18
to gdata-objec...@googlegroups.com
TVL;

Thank-you for the rapid response!

I’ll look into ‘People’.   I’m leaving today so that won’t occur until later in the week.
 It might useful to update some pages so others might discover this by some means other than bothering you!

Steve

--
You received this message because you are subscribed to a topic in the Google Groups "Google Data APIs Objective-C Client Library Discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/gdata-objectivec-client/PVMyfasYDzQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gdata-objectivec-...@googlegroups.com.
To post to this group, send email to gdata-objec...@googlegroups.com.
Visit this group at https://groups.google.com/group/gdata-objectivec-client.
For more options, visit https://groups.google.com/d/optout.

Steve Cronin

unread,
Sep 8, 2018, 7:41:14 PM9/8/18
to gdata-objec...@googlegroups.com
So I’ve now looked at People - which is called ‘PeopleService’ in the ‘Generated Services’ directory, yes?  
Is there any importance or significance that it alone, among the 138 items in this directory, is called out as a ‘Service’? 
Why is it not ’TasksService’ for example?

I have built both the GTLR.framework and the GTMSessionFetcherOSX.framework.

The ‘Linking to the Framework’ section of the 'Building the Library' document only mentions the GTLR.framework….

What am I supposed to do with the GTMSessionFetcher.framework? The GTLR.framewok does not appear to utilize the GTMSessionFetcher.framework.
In my setup, which could well be wrong, the Deps directory contains what appear to be GTMSessionFetcher capabilities expressed as source files...
 
In the 'CocoaPods’ section of the 'Building the Library'  document it says:

“...The GoogleAPIClientForREST podspec does not include a dependency on any authentication support, if you plan on using an api that also needs authentication, you'll either want to use GTMAppAuth by depending on GTMAppAuth also, or you can use something else like the Google Sign-In SDK; see their site for full information this.   NOTE: The Oauth2 subspec in the pod is NOT needed for authentication, that is for talking to that service directly. You just need something like GTMAppAuth…."


I don’t see any Oauth2 mentions in the xcodeproj which sucessfully  builds the GTLR.framework - am I missing something?

Is GTMAppAuth the preferred way to authenticate to Google Services in 2018?

After a ‘pod install’ I can also build the DriveSample… So it feels like basically I’m in decent shape from a code availability standpoint…

However, the examples really don’t help me understand the use of the 2 frameworks noted above and their usage in my own application.
The examples appear to use a PODS xcodeproj which I don’t understand nor do I want to use.

Does the verbiage above imply something more than using Xcode to create a target dependency on GTMAppAuth in the DriveSample?
Is this dependency implemented by simply using the Product ‘libGTMAppAuth.a’ from the PODS.xcodeproj?

Overall, the complexity of building and using the technologies involved in the examples confuses me  - rather than helping me understand how to put the pieces together...

Thomas Van Lenten

unread,
Sep 13, 2018, 12:21:58 PM9/13/18
to Google Data APIs Objective-C Client Library Discussion

On Saturday, September 8, 2018 at 7:41:14 PM UTC-4, SteveC wrote:
So I’ve now looked at People - which is called ‘PeopleService’ in the ‘Generated Services’ directory, yes?  
Is there any importance or significance that it alone, among the 138 items in this directory, is called out as a ‘Service’? 
Why is it not ’TasksService’ for example?

The names come out of their discovery documents, so it is up to the team/group that creates the API what it is called.
 

I have built both the GTLR.framework and the GTMSessionFetcherOSX.framework.

The ‘Linking to the Framework’ section of the 'Building the Library' document only mentions the GTLR.framework….

What am I supposed to do with the GTMSessionFetcher.framework? The GTLR.framewok does not appear to utilize the GTMSessionFetcher.framework.
In my setup, which could well be wrong, the Deps directory contains what appear to be GTMSessionFetcher capabilities expressed as source files...

You don't need to directly use the SessionFetcher one, if you use the checked in GTLRCore project it includes the SessionFetcher sources in an attempt to simplify things for developers.
 
 
In the 'CocoaPods’ section of the 'Building the Library'  document it says:

“...The GoogleAPIClientForREST podspec does not include a dependency on any authentication support, if you plan on using an api that also needs authentication, you'll either want to use GTMAppAuth by depending on GTMAppAuth also, or you can use something else like the Google Sign-In SDK; see their site for full information this.   NOTE: The Oauth2 subspec in the pod is NOT needed for authentication, that is for talking to that service directly. You just need something like GTMAppAuth…."


I don’t see any Oauth2 mentions in the xcodeproj which sucessfully  builds the GTLR.framework - am I missing something?


If you want to use an api that requires auth, you'll need to use a library to provide the support.  There are two from Google mentioned in the wiki, which you want is up to you.
 

Is GTMAppAuth the preferred way to authenticate to Google Services in 2018?

Both work.  Some developers have needs that make one a better choice than the other.
 

After a ‘pod install’ I can also build the DriveSample… So it feels like basically I’m in decent shape from a code availability standpoint…

However, the examples really don’t help me understand the use of the 2 frameworks noted above and their usage in my own application.
The examples appear to use a PODS xcodeproj which I don’t understand nor do I want to use.

Does the verbiage above imply something more than using Xcode to create a target dependency on GTMAppAuth in the DriveSample?
Is this dependency implemented by simply using the Product ‘libGTMAppAuth.a’ from the PODS.xcodeproj?

Yes, we used pods in the Sample's just to simplify getting those projects to easily build for folks.  When we tried to do it directly via git modules, project references, etc. it became a twisty web of deps and occasionally broke as those projects made changes (they didn't always have stand alone projects we could pick up easily).
Reply all
Reply to author
Forward
0 new messages