iOS and OS X Network Programming Cookbook


iOS and OS X Network Programming Cookbook
eBook: $29.99
Formats: PDF, PacktLib, ePub and Mobi formats
$25.49
save 15%!
Print + free eBook + free PacktLib access to the book: $79.98    Print cover: $49.99
$49.99
save 37%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Overview
Table of Contents
Author
Support
Sample Chapters
  • Use several Apple and third-party APIs to develop both server and client networked applications
  • Shows you how to integrate all of the third-party libraries and APIs with your applications
  • Includes sample projects for both iOS and OS X environments

Book Details

Language : English
Paperback : 300 pages [ 235mm x 191mm ]
Release Date : January 2014
ISBN : 1849698082
ISBN 13 : 9781849698085
Author(s) : Jon Hoffman
Topics and Technologies : All Books, Mobile Application Development, iOS, Mobile, Cookbooks


Table of Contents

Preface
Chapter 1: BSD Socket Library
Chapter 2: Apple Low-level Networking
Chapter 3: Using Libnet
Chapter 4: Using Libpcap
Chapter 5: Apple High-level Networking
Chapter 6: Bonjour
Chapter 7: AFNetworking 2.0 Library
Chapter 8: MKNetworkKit
Index
  • Chapter 1: BSD Socket Library
    • Introduction
    • Finding the byte order of your device
    • Retrieving network address information
    • Performing a network address resolution
    • Creating an echo server
    • Creating an echo client
    • Creating a data server
    • Creating a data client
  • Chapter 2: Apple Low-level Networking
    • Introduction
    • Retrieving network address information
    • Performing a network address resolution
    • Creating an echo server
    • Creating an echo client
    • Creating a server to receive data
    • Creating a client to send data
    • Checking the network status
  • Chapter 3: Using Libnet
    • Introduction
    • Installing libnet
    • Adding libnet to your project
    • Resolving names to addresses with libnet
    • Retrieving local addresses with libnet
    • Constructing a Ping packet with libnet
    • Constructing a UDP packet with libnet
    • Constructing a TCP packet with libnet
  • Chapter 4: Using Libpcap
    • Introduction
    • Adding libpcap to your project
    • Retrieving network device information
    • Capturing packets
    • Decoding Ethernet headers
    • Decoding IP headers
    • Decoding ARP headers
    • Decoding TCP headers
    • Decoding UDP headers
    • Decoding ICMP headers
    • Filtering packets
    • Saving a capture file
    • Creating a simple port scanner using libnet and libpcap together
  • Chapter 5: Apple High-level Networking
    • Introduction
    • Performing HTTP(S) synchronous GET requests
    • Performing HTTP(S) synchronous POST requests
    • Performing HTTP(S) asynchronous GET requests
    • Performing HTTP(S) asynchronous POST requests
    • Parsing an RSS feed with NSXMLParser, NSURL, and NSData
    • Creating a peer-to-peer bluetooth network
  • Chapter 6: Bonjour
    • Introduction
    • Publishing a Bonjour service
    • Discovering a Bonjour service
    • Resolving a Bonjour service
    • Creating an echo server that uses Bonjour to advertise the service
    • Creating an echo client that uses Bonjour to discover the service
  • Chapter 7: AFNetworking 2.0 Library
    • Introduction
    • Checking the network connection type and changes
    • Creating a web client using AFHTTPSessionManager
    • Creating a custom response serializer
    • Using the UIImageView+AFNetworking category
    • Downloading files with a progress bar
  • Chapter 8: MKNetworkKit
    • Introduction
    • Creating and using the MKNetworkKit engine
    • Uploading a file using MKNetworkKit
    • Downloading a file using MKNetworkKit
    • Using the UIImageView+MKNetworkKitAdditions.h category and caching the images
    • Adding a progress bar to upload or download

Jon Hoffman

Jon Hoffman  has close to 20 years of experience in the field of Information Technology. Over these 20 years, Jon has worked in the areas of system administration, network administration, network security, development and architecture. Currently, he works as a software engineer at Syn-Tech Systems. He has started a network development blog at http://network-development.blogspot.com that will enhance and expand on the material covered in this book.

Over the past five years, he has developed numerous applications for the iOS platform. These include several apps that he has published in the App Store, apps that he has written for third parties, and numerous enterprise applications.

What really drives Jon are the challenges in Information Technology; there is nothing more exhilarating for him than overcoming a challenge. Some of Jon's other interests are watching baseball (Go Sox!) and basketball (Go Celtics!). Jon also really enjoys Taekwondo; he and his eldest daughter Kailey are on pace to get their black belts together in the spring of 2014.

Sorry, we don't have any reviews for this title yet.

Code Downloads

Download the code and support files for this book.


Submit Errata

Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.


Errata

- 1 submitted: last submission 18 Mar 2014

 

 

Sample chapters

You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

Frequently bought together

iOS and OS X Network Programming Cookbook +    Oracle Advanced PL/SQL Developer Professional Guide =
50% Off
the second eBook
Price for both: $45.60

Buy both these recommended eBooks together and get 50% off the cheapest eBook.

What you will learn from this book

  • Create client- and server-based applications with the BSD socket API
  • Create client- and server-based applications with CFNetworking
  • Publish, find, and connect client applications with servers using Apple’s Bonjour library
  • Use the AFNetworking library to connect to web-based services
  • Connect to web-based services using the MKNetworking library
  • Explore the LibNET packet construction library in OS X
  • Get to grips with the LibPCAP packet capture library in OS X
  • Discover Apple’s high-level APIs to connect to devices via Bluetooth
  • Connect two devices with a Bluetooth connection

In Detail

Darwin, which forms the core set of components for OS X and iOS, is compatible with the Single UNIX Specification Version 3 and POSIX UNIX. Therefore OS X and iOS are UNIX operating systems. While there are numerous books and articles written to teach network development in a UNIX environment there is surprisingly little dedicated to teaching network development specifically in an Apple environment. In this book we will be covering the standard UNIX networking stack with BSD Sockets as well as Apple’s frameworks like CFNetworking and Bonjour.

"iOS and OS X Network Programming Cookbook" is an enthralling code-focused book on developing client and server applications for the iOS and OS X environments. You will learn how to integrate a number of Unix (BSD Sockets), Apple specific (CFNetworking, NSMutableURLRequest, Bonjour) and third party APIs (AFNetworking, MKNetworking) with your own apps.

"iOS and OS X Network Programming Cookbook" begins by showing you how to build both client and server applications using the BSD Socket Library as well as Apple’s CFNetworking library. The sample code includes samples for both iOS and OS X.

It then covers how to add Bonjour to publish, find, and connect to services. This can be used to create peer-to-peer applications over local networks. Finally it shows how to integrate third-party libraries like Libnet, LibPCAP, AFNetworking, and MKNetworking with the reader’s apps.

A lot of developers do not realize that iOS is a full UNIX-based operating system that contains a full set of networking APIs. These APIs can be used to create both client- and server-based applications in the iOS environment as well as OS X. Using the Apple’s Bonjour library you will learn how to publish, find, and connect the services together without hardcoding the connection information. There are also a number of third-party APIs that can be used to easily connect iOS and OS X applications to web-based services. Finally this book will cover several low level libraries like LibNET and LibPCAP on the OS X environment.

"iOS and OS X Network Programming Cookbook" will cover several UNIX, Apple, and third-party libraries and APIs. The book will show the user how to integrate all of these libraries and APIs with their applications.

Approach

This book follows a recipe-based approach that will heavily focus on the code and how to integrate the samples with the reader’s projects.Each recipe consists of one or more methods that you can put directly into your app and use.

Who this book is for

This book is ideal for developers that want to create network applications for the Apple OS X or iOS platforms. All examples are written in Objective-C using XCode as the IDE. Knowledge of Objective-C and X-Code is essential.

Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Resources
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software