开发者

How to write a server for an iPhone app

开发者 https://www.devze.com 2023-02-03 09:50 出处:网络
I\'m writing a very simple iPhone app, basically a dropbox where people can submit ideas and then view what\'s in the dropbox. I need to write a server that will respond to my iPhone\'s (HTTP?) reques

I'm writing a very simple iPhone app, basically a dropbox where people can submit ideas and then view what's in the dropbox. I need to write a server that will respond to my iPhone's (HTTP?) requests. Are there any good tutorials on the web that will show me how to do th开发者_Python百科is? Thanks.


Well it really depends on what kind of platform are you trying to write your server. If it's going to be linux, apache, mysql and PHP (LAPM) then probably this question would answer some of your questions: Serving a json file for IPHONE app
Also this one might be helpful: http://www.sencha.com/learn/Tutorial:Creating_JSON_Data_in_PHP

You could server your data in various formats: binary, XML, JSON, etc. However if I were you i would definitely choose JSON ...

You also can use ruby, .net or anything else for building your web server, however probably php is going to be the one with the most examples.

Hope this helps.


For communicating with the server take a look at ASIHttpRequest, which has some good documentation and example code included http://allseeing-i.com/ASIHTTPRequest/How-to-use


i recomment using the ASIHttpRequest Classes.

On the serverside just use a simple JSON API and probably oAuth or HTTP Authentication to submit and receive Data from a Database.

0

精彩评论

暂无评论...
验证码 换一张
取 消