RestKit for REST web services on iOS | Salesforce Developers Blog

Has anyone investigated RestKit?  It looks pretty interesting – and might be of use when accessing the REST web services of Force.com on iOS devices.

It has a couple of features that make it pretty interesting (to me at least):

  1. You’ve got your HTTP verbs handled, along with a bunch of utility stuff like converting dictionaries into parameters etc.  Here’s a simple GET:
    [[RKClient sharedClient] get:@"/foo.xml" delegate:self];
  2. There’s an object mapping system – so you can map the incoming JSON to an Objective C object and play nicely.
  3. It has Core Data support – so you can add persistence to the object mapping system.
  4. It allows you to switch base URLs easily – great for sandbox/production testing.

Overall, it looks pretty interesting, and like a pretty nice little REST utility library. I have no idea if this will work with our REST URLs on Force.com – please let me know if you try and succeed! If you do, you’ll probably want to reference the RestKit home, and this useful tutorial on RestKit. The other side of the coin is authentication – check out some of the articles on our REST resource page – and I’m going to guess there are a couple oAuth authentication libraries out there for iOS as well!.

Stay up to date with the latest news from the Salesforce Developers Blog

Subscribe