Chapter 13

Ad-Hoc Networking with Bonjour


  • Using zero configuration networking
  • Resolving and connecting to Bonjour services
  • Implementing Bonjour to provide an excellent user experience


You can find the code downloads for this chapter at on the Download Code tab. The code for this chapter is in the Chapter 13 download and is divided into two example apps, which both contain a shared Bonjour library:

  • The Associate Help application publishes a Bonjour service and acts as a host in communication with a single client.
  • The Consumer Help application browses for available Bonjour services, acts as the client, and requests a connection with the host.
  • A shared library containing Bonjour, a Bonjour Service, and BonjourBrowser, a Bonjour Browser class, can be customized and dropped into your project to abstract the publication, discovery, resolution, and communication aspects from your front end.

Consumers using iOS devices have a lot of choices for applications, and those apps must provide an excellent user experience to gain recognition in a crowded marketplace. With the extensive penetration of networked devices and Wi-Fi networks, this presents an opportunity for companies to, quite literally, connect with their customers, engage them, and deliver an experience that exceeds ...

Get Professional iOS Network Programming: Connecting the Enterprise to the iPhone and iPad now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.