I'm writing an application that implements a Bonjour service and browser for the purpose of connecting to Logic Pro and interacting with a MIDI Device Script. Because it's connecting to Logic Pro running on the same system as the application, the service and browser do not need to access anything else on the local network.
I'm creating the service and browser with calls like this:
err = DNSServiceRegister(
&serviceRef, 0,
kDNSServiceInterfaceIndexLocalOnly,
"MyService",
"_osc._udp",
"local",
nullptr,
52854,
txtLen,
txtRecord,
static_cast<DNSServiceRegisterReply>(myCallback), context
);
err = DNSServiceBrowse(
&browserRef, 0,
kDNSServiceInterfaceIndexLocalOnly,
"_osc._udp",
nullptr,
static_cast<DNSServiceBrowseReply>(browserCallback),
context
);
Despite the fact that I'm passing in kDNSServiceInterfaceIndexLocalOnly
for the network interface, it still triggers an "Allow 'Application' to find devices on local networks?" permissions prompt.
How can I avoid that prompt?
It is both a significant failure point (in case users don't notice it or click 'Don't Allow' by mistake) but it may also scare them away, since it strongly implies my application is scanning devices on the local network, even though it's doing no such thing!
kDNSServiceInterfaceIndexLocalOnly
is the canonical way to indicate that you’re only interested in operating on the local device and, if that’s not working, I don’t see any alternatives at the Bonjour level )-:
My advice here is that you file a bug about this. I’m not sure what the eventually resolution will be — it could be just a bug that needs to be fixed, or there could be some deeper reason that I don’t understand — but a bug report is the best way to find out.
Please post your bug number, just for the record.
It’s possible that you could work around this by switching to another IPC mechanism. You wrote:
for the purpose of connecting to Logic Pro and interacting with a MIDI Device Script
So how does that work? You obviously control both ends of this communication channel, because you’re setting kDNSServiceInterfaceIndexLocalOnly
on both the listener and the browser. Is one of these running in some sort of plug-in?
[Sorry for the basic question here; I’m not really connected to the pro apps world.]
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"