In this recipe, we will use the
NSNetServiceBrowser class to look for our published service.
NSNetServiceBrowser class is used to find the services that are published by
NSNetService. Once we initialize the
NSNetServiceBrowser object, we need to assign a delegate, and then we can begin browsing for services. Taking into account the possibility of delays in receiving responses from the services and also because services can come online or go offline at any time, the
NSNetServiceBrowser object performs the service discovery asynchronously. The
NSNetServiceBrowser class relies on the delegate methods to handle the notifications of the services coming online or going offline.
This recipe is compatible ...