I\'m planning my first iPhone app and I\'d like to get some inputs as to how to build it, right from the start. The iPhone app is being built to be paired with a public faci
I would do this like I have done with a lot of AJAX web-page stuff. i.e.:
Have a URL on your server side package the information to be transmitted into XML format. (This can be through a CGI/PHP script or whatever). Your transmitting XML in the message body - so it's easy to human read and debug with a standard web browser.
Use the standard iPhone NSXMLParser methods to parse out the individual data fields from the XML doc, and write it back to your database. This method is equiped to both fetch the data from a URL and parse it in one call - like:
NSURL *xmlURL = [NSURL URLWithString:@"http://www.example.com/livefeed.cgi"]; NSXMLParser *myParser = [[NSXMLParser alloc] initWithContentsOfURL:xmlURL];