I am constructing an iOS app utilizing MultipeerConnectivity for native peer-to-peer networking. The native community permission immediate is not showing, and I am getting -72008 errors (NSNetServicesErrorDomain).
Drawback:
- When utilizing MultipeerConnectivity (
MCNearbyServiceAdvertiserorMCNearbyServiceBrowser), iOS ought to present a permission immediate: “App want to discover and connect with units in your native community.” - The immediate by no means seems
- Community operations fail with error:
NSNetServicesErrorDomain error -72008 - The app would not seem in Settings > Privateness & Safety > Native Community
What I’ve verified:
NSLocalNetworkUsageDescriptionis current in Data.plistNSBonjourServicesarray is current with the proper service sort:_kaunwho._tcp- The service sort matches what MultipeerConnectivity makes use of (with out the
_tcpsuffix in code:"kaunwho") - Data.plist accommodates each keys after construct:
NSLocalNetworkUsageDescription KaunWho makes use of native networking to attach close by units for multiplayer gameplay. NSBonjourServices _kaunwho._tcp
Code:
// Service sort utilized in code
personal let serviceType = "kaunwho" // 1-15 chars, lowercase, alphanumeric + hyphens
// Beginning advertiser
advertiser = MCNearbyServiceAdvertiser(peer: myPeerID, discoveryInfo: nil, serviceType: serviceType)
advertiser?.delegate = self
advertiser?.startAdvertisingPeer()
What I’ve tried:
- Verified Data.plist accommodates
NSBonjourServices(confirmed throughplutil -p) - Deleted and reinstalled the app fully
- Cleaned construct folder and rebuilt
- Examined on my iPhone 13 and likewise on an iPhone 17 Professional (not simply simulator)
- Ensured the app makes use of MultipeerConnectivity when testing (tapping buttons that set off
startAdvertisingPeer())
Setting:
- iOS 18.0+
- Xcode 26.0
- SwiftUI app
- MultipeerConnectivity framework
Questions:
- Is there one thing else required to set off the permission immediate?
- Ought to the permission immediate seem routinely on first use, or do I have to request it explicitly?
- Might a earlier denial (even when not seen) stop the immediate from showing?
- Are there any identified points with MultipeerConnectivity and iOS 18 that may have an effect on this?
Further context:
Based on Apple’s documentation, each NSLocalNetworkUsageDescription and NSBonjourServices are required. I’ve verified each are current, however the immediate nonetheless would not seem.
