I have an app which uses NSNetServiceBrowser to search for mDNS services.
It has been working great up until I updated my iMac to macOS Sierra (10.12)
I declare an NSNetServiceBrowser like this:
@property (strong, nonatomic) NSNetServiceBrowser *serviceBrowser;
and then initialise it like this:
_serviceBrowser = [[NSNetServiceBrowser alloc] init];
_serviceBrowser.delegate=self;
and then start it like this:
[_serviceBrowser searchForBrowsableDomains];
But I do not get any call backs to
- (void)netServiceBrowser:(NSNetServiceBrowser *)aNetServiceBrowser didFindDomain:(NSString *)domainString moreComing:(BOOL)moreComing
Instead in the console I get these errors:
2016-10-03 12:35:11.467503 mDNS Hunter[70508:9564329] dnssd_clientstub ConnectToServer: connect()-> No of tries: 1
2016-10-03 12:35:12.468017 mDNS Hunter[70508:9564329] dnssd_clientstub ConnectToServer: connect()-> No of tries: 2
2016-10-03 12:35:13.468456 mDNS Hunter[70508:9564329] dnssd_clientstub ConnectToServer: connect()-> No of tries: 3
2016-10-03 12:35:14.469617 mDNS Hunter[70508:9564329] dnssd_clientstub ConnectToServer: connect() failed path:/var/run/mDNSResponder Socket:8 Err:-1 Errno:1 Operation not permitted
So I wonder - do I need to add some new entries to my entitlements or something to make this work with Sierra?
Or is there something else going on here?
Thanks in advance!
Kenny.