Checking the network status

Any time you create an iOS application that communicates to other devices over the Internet, you will eventually need to verify that you have a connection prior to making your network calls. This can be done pretty easily by verifying that the address we are trying to connect is reachable, but only lets you know if you have a network connection or not.

When you write applications that communicate with mobile devices over the Internet, one of the things you need to keep in mind is that your users probably have a data plan that limits the amount of data they can send in a month. If they exceed that limit, they may have to pay an extra fee. If your application sends large amounts of data, it would be good to know what type ...

Get iOS and OS X Network Programming Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.