Preface
Darwin forms the core set of components for OS X and iOS, and is compatible with Single UNIX Specification Version 3 and POSIX UNIX. Therefore, OS X and iOS are considered to be Unix operating systems. This means that OS X and iOS use the same basic networking stack that all Unix operating systems use.
Apple has added several frameworks on top of the basic Unix networking stack. This includes frameworks such as CFNetworking and Bonjour, as well as classes such as NSURLConnection
. There are also several outstanding third-party frameworks written specifically for OS X and/or iOS.
There are numerous books written to teach network development in a Unix environment. However, it is hard to find books dedicated to teaching network development, specifically in an Apple environment that discusses Apple-specific libraries and frameworks. Using and understanding these frameworks can greatly reduce the time needed to add network components to our applications.
This book will begin by discussing the lower-level frameworks, such as BSD Sockets and CFNetworking. Higher-level frameworks and third-party libraries are based on these frameworks, so understanding how they work is essential for understanding how the higher-level libraries work.
We will then look at two libraries, one to construct and inject network packets, and another to capture incoming packets. These libraries are specific to OS X development. We will then look at Apple's higher-level frameworks followed by two outstanding third-party frameworks.