I want to be able to load data from my API server in the background of my iPhone app. How do I achieve this?
+1
A:
Assuming it's an http based api, use the asynchronous methods of NSURLConnection
. More information can be found here. Otherwise you can use the async methods of NSOutputStream and NSInputStream with a CFSocket.
Elfred
2010-08-26 14:55:41
I second the use of NSURLConnection async methods.
MikeyWard
2010-08-26 15:11:04
A:
Lots of options:
- Grand Central Dispatch
NSThread
NSOperationQueue
- Asynchronous network calls
Stephen Darlington
2010-08-26 15:03:06