How to get the list of all announced bonjour services on all available domains?

Farcaller picture Farcaller · Oct 19, 2009 · Viewed 8.6k times · Source

It's not the problem to look in all domains, but I can't find the right way to look for any service on the network.

Answer

Tony Langdon picture Tony Langdon · Aug 29, 2010

Old thread but there is a way to find the local services Discovering all advertised Bonjour service types. You will need to do some manipulation of the results to get the types in the correct format. This works on Mac & iPhone although no services are discovered if I haven't got a Wifi connection on iPhone.

    NSNetServiceBrowser* domainBrowser = [[NSNetServiceBrowser alloc] init];
    domainBrowser.delegate = self;
    [domainBrowser searchForServicesOfType:@"_services._dns-sd._udp."
                              inDomain:@"local."];