Chapter 17. Advanced Networking
This chapter addresses several advanced networking topics. We start by looking in Section 17.1 at how we can determine the network connectivity of the device. This is important for several reasons. First, your application needs to determine the status of network connectivity and alert the user of connectivity problems instead of presenting an empty view to the user. In addition, some applications require WiFi connection for specific services (e.g., downloading large files). You should be able to enable such services dynamically, based on the connectivity of the device.
After that, we tackle the issue of uploading multimedia content (e.g., photos) to remote servers, in Section 17.2. Next, In Section 17.3, we present a category on NSString
that allows you to easily compute the MD5 digest of a string. This is important as some services, such as Flickr, require posting parameters with the appropriate signature. Section 17.4 then shows you how to present a responsive table view whose data rows are fed from the Internet without sacrificing the user experience. Next, Section 17.5 addresses the topic of push notification. Section 17.6 discusses sending email from within your iPhone application. Finally, Section 17.7 summarizes the chapter.
Determining Network Connectivity
In this section, we look at a mechanism that allows you to determine the network connectivity of the device. We develop the following three methods in a category on UIDevice
class:
cellularConnected ...
Get iPhone SDK 3 Programming: Advanced Mobile Development for Apple iPhone and iPod touch 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.