Re: Can't discover bonjour service
Re: Can't discover bonjour service
- Subject: Re: Can't discover bonjour service
- From: "Quinn \"The Eskimo!\"" <email@hidden>
- Date: Thu, 26 Nov 2015 08:34:16 +0000
On 26 Nov 2015, at 00:53, Carl Hoefs <email@hidden> wrote:
> I do this very same thing in my iOS 8 apps, and it works for me. However, I seem to recall that I never could get it to work if I used @"" for the domain. Have you tried supplying a non-zero length string for the domain name (same on both sides)?
The empty domain should work, and on iOS it should be equivalent to "local.". However, if you just want to operate locally, you shouldn't make up a domain name, you should supply "local.".
On 26 Nov 2015, at 01:39, email@hidden wrote:
> I was trying to use peer-to-peer networking between 2 iOS 8 devices …
iOS 8? I generally recommend that you avoid iOS 8 when testing Bonjour code (and, for that matter OS X 10.10.x, x < 4) because it uses an end-of-life Bonjour daemon. If you care about Bonjour, upgrade your devices.
> The WiFi network at work must have disabled multicast. It works on my home WiFi network. However, that makes me wonder why I can discover printers on that same network.
It's not uncommon for corporate networks to play games with multicast, and specifically Bonjour.
A good way to double check your assumptions is to run the WiTap sample code, which is a known working example of how this should work.
<https://developer.apple.com/library/ios/#samplecode/WiTap/>
IMPORTANT: WiTap sets the includesPeerToPeer property, so it can work in situations where infrastructure Bonjour is broken. Whether you want to replicate that in your code, or disable it in in WiTap, is a policy decision you'll have to make yourself.
Share and Enjoy
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden