Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

jonmountjoy/Force.com-iOS-oAuth-2.0-Example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Force.com iOS oAuth 2.0 Example

This Xcode 4 project shows how to access the Force.com REST API using bog-standard OAuth 2.0 and HTTP.

Contents

  • RESTProcessor - this class contains the HTTP callout to the REST API
  • RawRESTOauthAppDelegate - contains the authentication logic - essentially configuring the OAuth library for Force.com
  • OAuth Classes and Resources - this group of files contains the Google Toolbox for Mac - OAuth 2 Controllers and JSON parser - http://code.google.com/p/gtm-oauth2/ I had to modify 2 or 3 lines of code in requestRedirectedToRequest (in GTMOauth2SignIn.m)

Using

  • Go to Setup -> App Setup -> Develop -> Remote Access on Force.com, and create a new Remote Access. Use a HTTPS callback URL such as https://developer.force.com/callback/
  • The callback URL isn't actually used, except as a signal.

Take the Consumer Key, Secret, and Callback URL and add them to the RawRESTOauthAppDelegate.m - the first three constants.

You should be good to go.

Author

Jon Mountjoy

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published