The URL Loading System

Apple provides a robust stack of APIs for communicating over the network. Each level of the stack is available to you, starting with the BSD Sockets layer at the base, the C-based CoreFoundation layer, and the Objective-C–based Foundation layer. For client-side apps, there is rarely a need to dive deeper than the Foundation layer.

For most applications, your network communication can be provided by the URL Loading System found in the Foundation layer. With this system, you connect, download, and upload data to many services that can be referenced via a URL. This functionality is not limited to HTTP-based services (http and https) but includes support for file transfer protocol (ftp), local file URLs, and data URLs.

The ...

Get The Core iOS Developer’s Cookbook, Fifth Edition 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.