bonjour broken in iOS 14


Gerriet M. Denkmann
 

This worked up to iOS 13:

let serviceType = "_Gmd-BackGround._tcp."
let parameters = NWParameters()
parameters.includePeerToPeer = true
let browser = NWBrowser(for: .bonjour(type: serviceType, domain: nil), using: parameters )
browser.stateUpdateHandler =
{ (newState: NWBrowser.State) in

print(“\newState”)
}
browser.start(queue: queue)

But in iOS 14 the stateUpdateHandler gets a .failed NWBrowser.State, with DNS Service Error: NoAuth(-65555)

How can this be fixed?

Gerriet.

Join cocoa@apple-dev.groups.io to automatically receive all group messages.