eHow launches Android app: Get the best of eHow on the go.

How To

How to Take Your Iphone App "online"

Member
By bikr
User-Submitted Article
(0 Ratings)
iPhone
iPhone

This article will cover the very basics of taking the "next step" in iphone development, and making an "online" app.

Difficulty: Moderate
Instructions

Things You'll Need:

  • iPhone SDK
  • General understanding of xcode and obj C.
  1. Step 1

    The easiest way to get your app "online", and by online I mean able to store retrieve and share data with other users of your app, is to store everything in a central database and use a combo of PHP XML to do the actual communicating. Setup a database for your project, and polish up your php skills.

  2. Step 2

    You'll want all data that will be returned to your users to be in XML form, so that it can be parsed client side and used for your various needs. To do that you basically need to follow a format of ParentItem childitem1 blah childitem1 childitem2 blah2 childitem2 ParentItem

    This gives our app something to look for and use.

  3. Step 3

    You can setup your php pages to accept variables in the url , and build your code so that at certain events it will retrieve the contents of a url that includes your variables. Example:
    http://testurl.com/getusername.php?userid=25

    a usage example would have the php page connect to your mysql database and issue a select statement that retrieves the username that matches userid 25..

    SELECT username FROM users WHERE userid=25 for example..

    then echo the data in your php as so:

    USER USERNAME $username /USERNAME /USER

  4. Step 4

    Your xcode would grab the contents of the page and using the build in xmlparser you can have it set each element of the xml file (only 1 in our case) to an array with keys to be used as you wish..

    That's it, look for more detailed instructions in the future, when the SDK's NDA is raised.

Tips & Warnings
  • look around for xml parsing examples, a great start is the simple RSS tutorial that is available all over.
  • This is just a theory article, it just gives an idea not real code, so please have a good understanding of the code work..
Subscribe

Post a Comment

Post a Comment

Related Ads

  • Have you done this? Click here to let us know.
I Did This
Get Free Computers Newsletters

Copyright © 1999-2010 eHow, Inc. Use of this web site constitutes acceptance of the eHow Terms of Use and Privacy Policy .   en-US Portions of this page are modifications based on work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License. † requires javascript

eHow Computers
eHow_eHow Technology and Electronics