开发者

Logging into and communicating with a server from an iOS app...help!

开发者 https://www.devze.com 2023-01-17 09:16 出处:网络
Hey everyone. I have a fair amount of experience developing iOS apps, but nothing much with web/server interacting apps. For a project at work, I am making an app that will开发者_StackOverflow社区 let

Hey everyone. I have a fair amount of experience developing iOS apps, but nothing much with web/server interacting apps. For a project at work, I am making an app that will开发者_StackOverflow社区 let you login, and get pictures off from a server that will then be downloaded for display and review on the local device.

I need to get some pointers on the correct approach to take. Are there built-in classes that make doing something like this easy? Once the cogent is downloaded from the server, it will be viewed locally, so all I need is to get a point in the right direction for logging in and communicating with a server…from an iPhone.

Can anybody point me in the right direction?


Me, I'm using ASIHTTPRequest Librayry to communicate / download with Internet.

For example, for an news app I download latest news in JSON (with a PHP script on a web server) and store datas with SQLite. If you need a little explanation of JSON with iPhone, check here (in french, but source codes are in english ^^)

When I need to download an image, I use ASIHTTPRequest and a queue to avoid downloading to much files at the same time.

If you want more information about a step, just say it.

Good Luck !


NURLConnection is your friend, along with its delegate methods.

Don't be lured by the temptation to use the -sendSynchronous method (which, now that I think about it, if you require authentication, you probably can't use anyway).

0

精彩评论

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

关注公众号