Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Use operation queues when working with blocking network calls. Listing 15-4 offers two use-case examples. In the first, a method runs a series of basic connectivity tests. The second method looks up IP addresses for Google and Amazon.
The connectivity method checks whether the iPhone or iPad 3G is connected to a cellular network (checked by Recipe 15-1’s activeWWAN method). If so, it launches a connection to whatismyip.com. It starts this process by initiating the application’s network activity indicator. This produces active feedback in the device’s status bar for an ongoing network operation.