NWBrowser with bonjour returning PolicyDenied(-65570)

Hi,

Having an issue on one mac using Xcode 16.3 and simulator 18.4. macSO 15.4

We are checking for bonjour:

authorizationBrowser = NWBrowser(for: .bonjour(type: "_bonjour._tcp", domain: nil), using: parameters)
        
authorizationBrowser?.stateUpdateHandler = { [weak self] newState in
  switch newState {
    ...
  }
}

However at the command line we get the error:

nw_browser_fail_on_dns_error_locked [B1] nw_browser_dns_service_browse_callback failed: PolicyDenied(-65570) 

Any idea why this is happening? or what this error means?

Thanks Antz

Answered by enodev in 846540022

I can confirm that running the app in Simulator in both Xcode 16.4 as well as Xcode 26 beta 2 now correctly allows the app in the simulator to use local networking in macOS 15.6 Beta (24G5054d).

I just want to know what Apple is doing that still after more than a MONTH the fix hasn't been released. All MacBooks from my corporation have updated to 15.4+. I'm completely UNABLE to work.

When will Apple fix this??? I'm very angry about this situation......

No. Tested it this morning.

Thanks for being so quick off the mark here. And, yep, that matches my expectations. The fix for this is not in macOS 15.5. I recommend that you continue to test with new beta releases as we seed them.

Share and Enjoy

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

To be honest this a matter of convenience to me, I have simple App that I can test on two real devices.

But, it does let me determine if it is fixed with two button clicks.

So the issue really comes down to when a new release might come, I realise that is beyond your control, but I suspect the focus on the 9th of June has become all consuming.

I notice this issue on a Kotlin Multiplatform app I just started building, but I do not have this issue on an older application that I've been developing for years. How strange!

Has anyone tried this in the macOS 15.6 beta (build 24G5054d) that we just started seeding? If not, please do, and post back here with your results.

I believe that this bug (r. 148870123) is fixed there, but with the backlog built up over WWDC I haven’t yet had a chance to personally verify this.

Share and Enjoy

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

I can confirm that running the app in Simulator in both Xcode 16.4 as well as Xcode 26 beta 2 now correctly allows the app in the simulator to use local networking in macOS 15.6 Beta (24G5054d).

NWBrowser with bonjour returning PolicyDenied(-65570)
 
 
Q