Using Services to integrate Drupal 7 site with custom iPhone app?

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
ltwinner's picture

I have to integrate a Drupal 7 site with a custom iPhone app. I need to be able to be able to perform the create, retrieve, update and delete process on the Drupal site using the iPhone app.

I have 20+ content types each with multiple custom fields. So what I need to know is will I have to write my own custom solution or is the Services module able to perform most/all of the functionality for me?

The functionality being the ability to make REST/http requests from the iPhone app that will create, retrieve, update or delete nodes for my content types and their custom fields? I can find very little info on the docs on the ability of the Services module to handle custom fields so I thought I'd ask about it here.

Comments

yes you can. It's pretty

flacoman91's picture

yes you can. It's pretty simple once you get going. Best way to figure it out is set up the server to use your custom content type.

I used the example here to understand it.

http://drupal.org/node/1246470

and here

http://drupal.org/node/1447020

On the iphone side - this is

MrMaksimize's picture

On the iphone side - this is a great library for interacting with services:

https://github.com/workhabitinc/drupal-ios-sdk

ARC?

onepartscissors's picture

MrMaksimize, you mention DRupal IOS SDK, which everyone recommends for connection iOS to Drupal, however, when i try and use it, it throws up over 200 errors, all due to Automatic Reference Counting and the forbidden 'release' and 'retain', etc, commands. Do you know of an updated way to get iOS to speak to Drupal Services?

You don't need Drupal iOS SDK at all

jefflinwood's picture

But if you do want to use it and it gives those errors, you can set the "-fno-objc-arc" flag on the sources in compiler settings. (http://stackoverflow.com/questions/6448874/disable-automatic-reference-c...)

Otherwise, you can just use AFNetworking (http://afnetworking.com/) to make the requests to Drupal.

D6?

Janner's picture

Would it be possible to create an iOS app with similar functionality but linked to a D6 site? If so, I'd love to hear the experiences of anybody who has done this.