GData library changes to use new fetcher and OAuth 2 components

57 views
Skip to first unread message

Greg Robbins

unread,
Apr 25, 2011, 5:58:36 PM4/25/11
to gdata-objec...@googlegroups.com
The top-of-trunk sources for the Google Data APIs Objective-C Client Library will soon have some substantial changes to allow the library to use our latest common networking code.

Updating your application for compatibility should be fairly quick and easy, as the compiler will catch the changes. 

If your application project includes the library source files, then there will be numerous changes from old to new source files when you update to the top-of-trunk sources.


Here's a summary of the changes.


- GDataHTTPFetcher 

The fetcher has been replaced by the newer GTMHTTPFetcher, incorporated from the gtm-http-fetcher open-source project using svn:externals. If your application uses the fetcher directly, you should update the application to use the new GTMHTTPFetcher.

Note that the new fetcher has a single callback; the older fetcher had separate success and failure callbacks. The new fetcher's logging method is also slightly different: [GTMHTTPFetcher setLoggingEnabled:YES].


- OAuth

The GDataOAuth classes have been removed. OAuth 2 is supported directly by the API library; it incorporates in the gtm-oauth2 project using svn:externals. 

If your application uses the GDataOAuth classes, you should revise the application for the newer OAuth 2 library. In general, OAuth 2 offers a better user experience and fewer compatibility issues compared to OAuth 1. The OAuth 2 library interface is quite similar to the OAuth 1 library interface. OAuth 2 does require creating a client ID and secret for an installed application at the API Console, https://code.google.com/apis/console 

The CalendarSample application in the library's Examples folder has been updated to support signing in with OAuth 2.


- Authenticated downloads

If a user has been authenticated with OAuth 1 or 2, then authenticated file downloads now require attaching the authorizer to the fetcher, like [fetcher setAuthorizer:[service authorizer]]


- Service caching

The service class's method setShouldCacheDatedData: has been replaced with setShouldCacheResponseData:, reflecting that the library's caching is now based on resource ETags (when supported by service APIs) rather than last-modified dates.


- Mac OS X 10.4 compatibility has been dropped

The changes no longer allow the library to compile and run on Mac OS X 10.4. The latest release, 1.12, has been copied to a "10.4-compatible" branch in the subversion repository. If your application runs on Mac OS X 10.4, you should continue to use the 10-4 compatible branch indefinitely.

Greg Robbins

unread,
Apr 26, 2011, 7:09:47 PM4/26/11
to gdata-objec...@googlegroups.com
These changes are now submitted in the top-of-trunk sources of the subversion repository.

an0

unread,
May 6, 2011, 1:46:06 AM5/6/11
to Google Data APIs Objective-C Client Library Discussion
Is this "Unknown authorization header error"(http://code.google.com/p/
gdata-objectivec-client/issues/detail?id=81) bug fixed with oauth2 and
GDataHTTPFetcher?

1.12.0 with oauth still does not work on Google Calendar.

Greg Robbins

unread,
May 6, 2011, 2:07:16 AM5/6/11
to gdata-objec...@googlegroups.com
The library's CalendarSample application has been revised to use OAuth 2, so the Calendar API works fine now with OAuth 2.

Reply all
Reply to author
Forward
0 new messages