3. Core Foundation Networking

“The higher your structure is to be, the deeper must be its foundation.”

Saint Augustine

Apple’s Core Foundation library contains a framework called CFNetwork, giving you a library of APIs and structures and data which you can use in your apps to implement networking. This framework is built on top of the UNIX networking APIs including sockets, and gives you enhanced features such as functions that provide support for communicating with FTP and HTTP servers as well as resolving DNS hosts. CFNetwork takes a lot of the low-level detailed work of setting up sockets and network addresses out of your hands which means you don’t have to spend time or code on much of the setup and initialization of structures.

In this chapter ...

Get Network Programming with Swift: Tools and Techniques to Create iOS and OS X Apps that Network 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.