NSNetServiceBrowser cannot find services, while NsdManager detects it for android

I wrote the code of my bonjour discovery to type service _coap._udp..

static NSString* kTRServiceType = @"_coap._udp.";
static NSString* kTRDomain      = @"";


-(void) startBrowsing{
[self.serviceBrowser searchForServicesOfType:kTRServiceType inDomain:kTRDomain];}

Its opening 2 services out of 3, while NsdManager discovers all 3.

My NSNetServiceBrowser object is not local, as this may be a common error.

One service that NSNetServiceBrowser does not detect is also not displayed in the Bonjour Browser application. But when I download services to the Bonjour Browser application, this service becomes available for viewing. Reboot services like wake up my sleeping published service. This is really weird.

+4
source share

All Articles