Why does Bonjour service not require Bluetooth permission?

Local network permissions are required to use the Bonjour service, But Bonjour service can also detect nearby devices through Bluetooth scanning without Bluetooth permission.

https://developer.apple.com/library/archive/qa/qa1753/_index.html#apple_ref/doc/uid/DTS40011315/

Did I misunderstand? Or is there an issue with Apple's design here?

Replies

Bonjour’s interaction with Bluetooth is… well… complex. The story described in QA1753 is no longer accurate. Specifically, some time after I wrote that Q&A — in the iOS 8 / 9 timeframe IIRC — we disabled TCP/IP networking over Bluetooth completely. Apple’s peer-to-peer networking APIs now run exclusively over Wi-Fi.

Now, that isn’t to say that Bluetooth isn’t involved. In some cases Bonjour will use Bluetooth to aid in its discovery process.

Regardless, all of this is networking and thus covered by local network privacy privilege. If Bonjour does use Bluetooth, that work is done by a system process and you don’t have direct access to the Bluetooth results. Thus, there’s no need for your app to have the Bluetooth privilege.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

@eskimo Thank you for your reply. Can I understand it this way?

  1. Bonjour called a system process and obtained the devices discovered by the process through Bluetooth, assuming there are 4 devices ABCD;
  2. Then, based on certain device attributes or other information obtained from Bluetooth, devices that do not have Bonjour service capabilities will be filtered out, assuming that AB 2 devices are left behind;

In the above process, only Bluetooth was used to quickly discover nearby devices that support Bonjour service.

If we don't use Bluetooth, we can also discover devices A and B, and the results are consistent, but may be slower in time?