Can NWBrowser be used in an AppIntent extension? NoAuth

I have an iOS app that connects to a server running on macOS by leveraging NWListener & NWBrowser. It also makes use of the peerToPeer functionality / AWDL offered via the Network framework. This works great in the iOS app. Now I would like to add support for Shortcuts / App Intents in general.

The NWConnection on its own is also working great in the App Intent, but only if I provide the host/port manually, which means I can't use the peer to peer functionality. If I try to run my NWBrowser in the AppIntent it immediately changes its state to failed with a NoAuth (-65555) error:

nw_browser_cancel [B1517] The browser has already been cancelled, ignoring nw_browser_cancel().
nw_browser_fail_on_dns_error_locked [B1518] DNSServiceBrowse failed: NoAuth(-65555)

NWClientManager: Browser failed: -65555: NoAuth

I haven't found documentation/information on whether NWBrowser should work in an AppIntent extension or not.

Accepted Answer

Ah I just found the solution, I needed to add NSBonjourServices to my app extension's info.plist specifying the services I'm looking for

Can NWBrowser be used in an AppIntent extension? NoAuth
 
 
Q