Tech Blog   »   Home   »   Coders Forum   »   Computer Directory   »   Recent

Archives

Apps
Incorporating Google API For iPhone Development

Incorporating Google API For iPhone Development

The Google Data APIs permit client software to gain access and also maneuver data hosted by the services of Google.

Google Data APIs is a Cocoa structure that makes it possible for iPhone developers as well as the Mac OS X developers to simply write native applications by making use of Google Data APIs.

This framework manages:

  • Networking
  • XML generation and parsing
  • Query generation and Service-specific protocols
  • Sign-in for the Google accounts

The requirement of the Objective-C Client Library of the Google Data APIs is the iOS 3 or the Mac OS X 10.5 (also possible for later ones). The applications that run on the 10.4 of the Mac OS X could make use of the “10.4-friendly” part. Some of the examples directory has example application that shows the typical interactions with the Google services making use of the framework. You need to understand that the applications normally acts as simple browsers intended for the framework of feed as well as the entry classes intended for each one of the services. The source file of these samples which is the Window Controller has been written with standard Cocoa idioms in order to serve as the quick introductions to utilize the APIs.

The Objective-C Client Library of the Google Data APIs is offered as built framework, appropriate for the addition in a Mac application folder of a bundle Frameworks and also as a fixed library for iPhone development applications. On the other hand, the sources could also be assembled into an iPhone application development or even a Mac application.

How to link to Mac OS X Framework

In order to link to the Mac OS X Framework, the framework should be added to the X code project, drag the GData.framework to the Linked Frameworks of the project and then drag G Data framework from a Linked Framework group folder to a Link Binary together with the Library phase within the application target.

Authorization and Authentication

Authentication can be defined as confirming the identity of a user through his username, password and any other possible data, for instance 2-step codes or captcha answers provided through a mobile phone. The process of authentication could be accomplished in one of these two ways:

  • Client Login is the older Google-exact protocol used for signing in a user by demanding their password and username. This system is responsible for safe storage of a password in a system key chain. You should be aware that the Client Login can’t be used for a user account that has a 2-step verification system except the user decides to create application-specific password.
  • OAuth 2, the industry-standardized protocol that allows the server to validate a user by giving HTML login pages. Google Data API library make use of the authorization objected offered by controllers of the GTM OAuth 2. You can see some of the illustration applications for Docs, YouTube or Calendar for a display of the OAuth 2 sign-in. Also the OAuth 2 is a suggested way for managing sign-in.

Authorization can be defined as the application of access tokens designed for precise requests. The authorization of the API requested is managed by service class.

  • Client Login authorization which requires the password and the username to be supplied to a service class’s set User Credentials with Username: and password: method
  • OAuth 2 authorization needs an OAuth 2 Authentication object be provided to the service class’s setAuthorizer: method.

For More Information: iPhone Development

Article Source: Daniel Will




2 comments to Incorporating Google API For iPhone Development

  • Soleman

    I just started using X code on my Mac for iPhone development, but not using the Google APIs. Thank you for the information. I will have to look into how to incorporate how to do this through the Google APis.

  • Giggles

    The iPhone is the best smart phone on the market. It makes the DroidX look like an old pay phone! :-) Thanks for posting this article, I’m currently trying to learn the Xcode application to write my own apps.

Leave a Reply

  

  

  

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>