Book Image

iOS and OS X Network Programming Cookbook

By : Jon Hoffman
Book Image

iOS and OS X Network Programming Cookbook

By: Jon Hoffman

Overview of this book

Table of Contents (15 chapters)
iOS and OS X Network Programming Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Introduction


AFNetworking is an amazing network library for iOS and OS X and is incredibly easy to use. It is also very lightweight, modular, and superfast. You can download the AFNetworking library and sample code from the AFNetworking website at https://github.com/AFNetworking/AFNetworking.

In November 2013, the AFNetworking framework was updated to Version 2.0. This was a major update and drastically changed the way we used the library within our applications. This chapter will only cover Version 2.0 of the AFNetworking library.

For this chapter, we will be focusing on AFHTTPSessionManager whose class hierarchy goes back up to the NSURLSession class; therefore, the code in this chapter requires a minimum iOS version of 7.0 or a minimum Mac OS X version of 10.9. If your app targets iOS 6.0 or Mac OS X 10.8, you will want to use AFHTTPRequestOperationManager instead of AFHTTPSessionManager. For this chapter, we really needed to choose one of the two methods to focus on, and AFHTTPSessionManager...