Web Services Code Examples

Discussion in 'iOS Programming' started by newDeveloper, Jun 13, 2010.

  1. newDeveloper macrumors newbie

    Joined:
    Jun 13, 2010
    #1
    Does anyone have any examples of web services for an iPhone application?

    I basically want to communicate with a web server and pull down information such as images for display or text for an articles page. I can't seem to find any great online references for how to develop this.

    References or examples would be excellent, if you could just point me in the right direction.

    Thank you,
     
  2. skunkworker macrumors regular

    Joined:
    Sep 9, 2007
    #2
    Look into using something like REST on your server. all you need to do is create an NSURLRequest pointing to the server and sending a block of data in the POST or GET function. Then put that into NSURLConnection and voila you have it.

    Although on the server side there needs to be a program running that once it receives the data it sends data back as a response to the request.
     
  3. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    Location:
    Brobdingnag
    #3
    What have you tried?

    I googled cocoa touch web services and found no shortage of results.

    Other search terms:
    cocoa touch "web service"
    cocoa touch "web services"
    cocoa touch "web service" client

    You might also find this useful:
    http://code.google.com/p/cocoaasyncsocket/

    Your question is fairly vague. A webview could logically satisfy all your criteria.

    Be more specific about what kinds of servers you need to download things from. What protocols, what kind of content, etc.
     
  4. newDeveloper thread starter macrumors newbie

    Joined:
    Jun 13, 2010
    #4
    Well, I have researched the subject, specifically through the Apple developer documentation. The do not provide a ton of examples, which is how I personally learn.

    CFNetwork.pdf among other available documents.

    I guess I was interested in understanding if there were any open source examples out there that would demonstrate the functionality - lots of Hello World and more simplistic application examples available in texts, but when you get into this domain, I feel a little short on practical tutorials.

    Thanks for the info, I'll continue my search.
     
  5. skunkworker macrumors regular

    Joined:
    Sep 9, 2007
    #5
    What do you need corefoundation for that the NSURLConnection can't do?
     
  6. newDeveloper thread starter macrumors newbie

    Joined:
    Jun 13, 2010
    #6
    Good question, actually. In fact, your question tells me that I am looking in the wrong place to begin with. Let me start there then. Any good examples out there? My text has some using NSURLConnection, so I'll go down that path first. Thank you.
     

Share This Page