README.md

Drupal iOS SDK - Connect your iOS/OS X app to Drupal

What you need to know

The Drupal iOS SDK is a standard set of libraries for communicating to Drupal from any iOS device. Its extremely simple.
If you wanted to get a node you can do so calling some class methods on DIOSNode, creating an
NSDictionary and running the nodeGet method. Heres an example:

For every DIOS call you make, any method calls that are available to you use blocks.
This allows us to define what happens when we have a request that fails or succeeds.
If the request was successful the result would be something like this:

Extras

Demo App (Work in progress)

Branches

6.x-2.x 6.x-3.x and 7.x-3.x have all been moved to a DEPRECATED version of their branch.
The new dev branch will be the become the new master and as things are added, versions will be tagged and published.
master will always be the latest and greatest for the most up to date version of everything(Services, Drupal, Services Api, DIOS).

Tags are in this format
2.1-1.0 Which breaks down as, DIOSVersion 2.1, Services Api Version 1.0

Branches are in this format
2.x-1.x

OAuth

If you want to use oAuth theres only one thing you need to do for 2-legged

This will create your shared session with the baseURL and attach your consumer key and secret.

3-legged requires that you get some request tokens, and convert them into access tokens.
DIOS provides methods to do this, as an Example, this code will grab some request tokens and load a webview to be displayed

If you want to get back a notificaiton when the request tokens have been authorized youll need to register a URL
for your application and make sure it is defined in your oAuth consumer which you created on your Drupal website

Again, another example here, we registered our app url and this method gets called when it does.

Documentation

Troubleshooting

If you are getting Access denied, or API Key not valid, double check that your key settings are setup correctly at admin/build/services/keys and double check that permissions are correct for your user and anonymous.

X service doesnt exist in Drupal iOS SDK

You no longer really need to subclass any existing DIOS classes, unless you want to override.
[DIOSSession shared] ensures that session information is stored for as long as the cookies are valid
If you do want to make your own object, just follow the pattern in the other files and everything should work fine.
Use the issue queue here on github if you have questions. An addon library is here