views:

49

answers:

2

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
I second the use of NSURLConnection async methods.
MikeyWard
A: 

Lots of options:

  • Grand Central Dispatch
  • NSThread
  • NSOperationQueue
  • Asynchronous network calls
Stephen Darlington
Thanks for telling me! I ended up using NSThread
pki