How can i implement Bonjour

• Browses for services on local or remote domains using Bonjour • Automatically detects all available local domains and services • Displays information about each service, including domain name, IP address(es), and TXT record

Apple platforms have multiple Bonjour APIs. The one I generally recommend is Network framework.

Having said that, your requirements don’t seem to match a typical Bonjour use case. Your post suggests that you’re building a Bonjour diagnostic product rather than a typical Bonjour product. For example, most Bonjour products want to advertise and browse for a specific service type but it sounds like you want to browse for all service types.

If so, I have two suggestions for you:

  • You’re probably better off working with the low-level <dns_sd.h> API. A good place to start with the API is the DNSSDObjects sample code.

  • Browsing for all service types requires the multicast entitlement, per FAQ-3 of the Local Network Privacy FAQ

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

How can i implement Bonjour
 
 
Q