Since upgrading to Sequoia 15.4 and Xcode 16.3 I do not get the local network access prompt in the iOS simulator. Doesn't matter what version of iOS (16, 17, 18). Nada. The prompt does occur on a physical device, either installing fresh using TestFlight or by installing from Xcode.
Just to make sure it wasn't my app, I tried Apple's sample code for building a custom peer-to-peer protocol (https://developer.apple.com/documentation/network/building-a-custom-peer-to-peer-protocol), but no luck there either. The error message when searching for games is
nw_browser_fail_on_dns_error_locked [B1] nw_browser_dns_service_browse_callback failed: PolicyDenied(-65570)
Same problem as my app, caused by not granting local network access in the non-appearing dialog. When hosting a game, the error messages are:
nw_listener_socket_inbox_create_socket setsockopt SO_NECP_LISTENUUID failed [2: No such file or directory]
Listener ready on Optional(54559)
[_NWAdvertiser handleBonjourUpdateFlags:error:name:type:domain:] [L2] Error advertising bonjour service: DNS Error: PolicyDenied
_NWAdvertiser handleBonjourUpdateFlags:error:name:type:domain:] [L2] advertising denied by policy
I went back to Xcode 16.2 where I thought local networking did work, but still no prompt. So it looks like the iOS simulator on Sequoia 15.4 has an issue. Other things I tried: just using Wi-Fi, just using ethernet cable, uninstalling my Little Snitch network extension.
BTW, the NSLocalNetworkUsageDescription and NSBonjourServices are both defined in Info.plist.
Is anyone else experiencing problems with the local network access dialog not appearing on the iOS simulator?
Topic:
App & System Services
SubTopic:
Networking
Tags: