iosobjective-cios7bonjour

NSNetServiceBrowser: why does bonjour not see the computer on windows 7 on a LAN?


I did the class detection device names through bonjour (with NSNetServiceBrowser). Trying to find devices in the LAN via smb:

[self.bonjourBrowser searchForServicesOfType:@"_smb._tcp" inDomain:nil];

In the method of delegate found only two devices:

But bonjour does not see the third device (computer on windows 7). Although the Finder sees it and I can connect to it via smb: //192.168.1.5

How to detect the computer on windows 7 in LAN through Bonjour? May be specify the other type when searching (and not "_smb._tcp") or another domain?


Solution

  • Finder doesn't use Bonjour - it uses SMB directly. When you are looking for _"smb._tcp" you are looking for SMB services advertised using Bonjour, just as "_ipp._tcp" would be Internet Print Protocol on TCP advertised by Bonjour.

    Bonjour services for Windows is a free download from Apple and without it installed you will not discover Windows computers using Bonjour.