tags:

views:

34

answers:

4

Hello,

My question deals delivering information to iPhone devices via an online DB. (Essentially, I want to do something like the NYTimes App, which provides the latest news for each device containing the app). I know I need to use a SQL lite database to accomplish this. What is the best way to approach this problem? I am a newbie at this stuff, so I'm not sure exactly where to get started? Do I need to create an online DB, or can I update outstanding apps from a local SQL database?

Thanks in advance! Vineet

A: 

You need to create a web application which should return a data to iPhone over http protocol.

SQLDev
A: 

I think I've done something similar a while ago.

I created a simple PHP API which returns the posts from a blog in JSON form. Then in the iPhone app I make an API request, parse the resulting JSON string and setup a UITableView with the stuff I retrieved from the database. In this way you don't query the database directly, it's the PHP script that does it.

You could also use XML instead of JSON, of course. If you end up using JSON, you can use this library to parse it in your app.

Brainfeeder
+1  A: 

For connecting to remote databases for getting data you will have to send request from iphone either in XML or JSON format.

If you are using XML, then use NSXMLParser for parsing the XML file sent as response from the remote application. Better option would be to go for JSON.

Swapna
A: 

Thanks for your help Guys! Really appreciate it! So (because I am a complete newbie), I just want to makes sure I understand the process. I should (1)Get Comfortable setting up an online SQL database using PHP, (2) understand how to send requests from iPhone to the remote database either in JSON and XML, (3) Understand how to parse the XML or JSON, depending on what I decide to use. Is that the right process?