Chapter 1

Introducing iOS Networking Capabilities

WHAT’S IN THIS CHAPTER?

  • Understanding the iOS networking frameworks
  • Key networking APIs available to developers
  • Using your application’s run Loop effectively

Great iOS applications require a simple and intuitive user interface. Likewise, great applications that communicate with a web service of any kind require a well-architected networking layer. An application’s architecture must be designed with the flexibility to adapt to changing requirements and the capability to gracefully handle constantly changing network conditions, all while maintaining core design principles that enable proper maintainability and scalability.

When designing a mobile application’s architecture you must have a firm grasp of key concepts, such as the run loop, the various networking APIs available, and how those APIs integrate with the run loop to create a responsive, networked application framework. This chapter provides a detailed discussion of run loops and how to use them effectively within an application. Also provided is an overview of the key APIs and when each should be used.

UNDERSTANDING THE NETWORKING FRAMEWORKS

Before you begin development of an iOS application that interacts with the network, you must understand how the networking layers are organized in Objective-C, as shown in Figure 1-1.

Each iOS application sits on top of ...

Get Professional iOS Network Programming: Connecting the Enterprise to the iPhone and iPad now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.