Hi all,

So I want to create an iPhone APP using Xcode that allows users to log in to my Drupal site, and view nodes / post new nodes from their iPhone.

I've already installed the services module, created an end point, and set up AFNetworking and the Drupal iOS SDK in Xcode, I'm just wondering now how I "log my users in", so to speak.

Does anyone know where I would find documentation or a good tutorial for this? Even though I've done all of the ground work, I feel like I'm in limbo now!

E.g. I want users to type in their username, password, click a button (submit), and be logged in... How do I call nodes to certain views... etc.

Thanks!
B

Comments

sadashiv’s picture

You may read services documentation at http://drupal.org/node/109782.

Hth,
Sadashiv.

goofus’s picture

Hello,
Sorry I don't have specific information on Apple products, however I've worked on several "mobile to web" projects.

Are you a programmer? The reason I ask is, there are several strategies for "mobile to web" communication. If you literally require the mobile side to be written in Objective-C, then you need be a programmer (or spend time learning how to be one) :)

Some folks simply add or change the layout of their website so that it renders within a mobile size web browser. With Drupal, you might accomplish a "mobile version" of you website simply by adding a theme and doing some configuration. For some folks, that is really all they need (their Drupal site with a mobile layout).

To summarize, on the mobile side do you have to have a native IOS user interface? Or, can you use a mobile web browser. For the server (Drupal) end, are you introducing business logic the requires new json/and or XML to process requests. Or, can you just re-configure Drupal to render a mobile version of itself. Thus, no new REST service (I.E. communication via JSON/and or XML) required.

That's my suggestion. Compare your detailed requirements, with your resources, then choose a strategy :)

Good Luck :)

paewrblue’s picture

Hi, stylerepublic

I'm stuck at the point "How I log my users in" as well.
Did you find a solution on that ?
I find that there aren't many/any DIOS-IOS-SDK tutorials on the internet.
If you don't mind, would you send me a zip of your project please.
my email viper1344@gmail.com
I've been searching for two- three days still got no clue where to go on.

Thank you very much.
Pae

jaypan’s picture

The current way to do it is to use the Services module with OAuth, and verify the user using OAuth. The services module will log the user in using this method.

Contact me to contract me for D7 -> D10/11 migrations.

paewrblue’s picture

Thank you very much Jaypan
I will try that right away.

paewrblue’s picture

I just got my app (login) working, it was all my mistakes.
I enabled the service in the Drupal, but inside the rest service configuration
I didn't enable any of the resources.
After enabled all those resources, I finally can login to my drupal website.

Thank you very much for your help.