Summary
After upgrading to macOS 26.3, MCNearbyServiceAdvertiser fails with error ‑72008 (Bonjour/Multipeer service error). The crash is not caused by a bug in the app logic but by new privacy and entitlement requirements that Apple now enforces on the local‑network APIs.
Key takeaway: Starting with macOS 26, any app that advertises or browses for nearby peers must declare its use of the local network in the Info.plist and request the appropriate entitlements.
Root Cause
The error code ‑72008 (kDNSServiceErr_Unknown) is returned when the system cannot start the Bonjour advertisement because one or more of the following required declarations are missing:
- Missing
NSLocalNetworkUsageDescription– macOS now requires a user‑facing description that explains why the app needs local‑network access. Without it the advertising call is silently denied. - Missing
NSBonjourServicesarray – The list of Bonjour service types the app intends to use must be declared in the plist. - Missing Multipeer entitlement – The
com.apple.developer.networking.multipeerentitlement is required forMCNearbyServiceAdvertiserto function on macOS 26+.
When any of these are absent, the OS refuses to create the underlying network service, resulting in the didNotStartAdvertisingPeer callback with the ‑72008 error.
Why This Happens in Real Systems
- Apple tightened local‑network privacy in macOS 26.3 to align with iOS 14+ behavior.
- The system now validates the app’s entitlements and plist entries at runtime before allowing any Bonjour advertisement.
- Existing apps that were built before this change continue to work on older macOS versions but break once the OS is upgraded, because the plist/entitlements were never required before.
Real-World Impact
- Discovery failures – Users cannot see or be seen by other peers, breaking core features (e.g., multiplayer games, collaborative editing).
- User‑facing errors – The app logs a cryptic
-72008error, leading to support tickets and poor user experience. - App Store rejection – If the missing plist keys are not added, the app may be rejected during review for “inappropriate use of local network”.
Example or Code (if necessary and relevant)
NSLocalNetworkUsageDescription
We need local network access to discover nearby players.
NSBonjourServices
_myapp._tcp
import MultipeerConnectivity
class Advertiser: NSObject, MCNearbyServiceAdvertiserDelegate {
private var advertiser: MCNearbyServiceAdvertiser?
func startAdvertising() {
guard let peerID = MCPeerID(displayName: UIDevice.current.name) else { return }
// Ensure the service type matches the plist entry
let serviceType = "myapp"
advertiser = MCNearbyServiceAdvertiser(peer: peerID,
discoveryInfo: nil,
serviceType: serviceType)
advertiser?.delegate = self
advertiser?.startAdvertisingPeer()
}
// MARK: - MCNearbyServiceAdvertiserDelegate
func advertiser(_ advertiser: MCNearbyServiceAdvertiser,
didNotStartAdvertisingPeer error: Error) {
// Log the error – usually -72008 if plist/entitlements are missing
print("Advertising failed: \(error.localizedDescription)")
}
}
The code above will still fail unless the plist keys and the Multipeer entitlement are present.
How Senior Engineers Fix It
- Add the required plist entries –
NSLocalNetworkUsageDescriptionandNSBonjourServiceswith the exact service type used in code. - Enable the Multipeer entitlement – In Xcode, go to Signing & Capabilities → + Capability → Multipeer Connectivity.
- Test on a clean install – Verify that the first launch prompts the user with the local‑network permission dialog.
- Graceful error handling – Provide a user‑friendly message when
didNotStartAdvertisingPeerfires, and fall back to an alternative discovery method if possible. - CI validation – Add a build‑phase script that checks for the presence of the plist keys to catch regressions early.
Why Juniors Miss It
- Lack of awareness of OS‑level privacy changes – The requirement for
NSLocalNetworkUsageDescriptionand explicit Bonjour service declarations is relatively new on macOS. - Assuming old behavior persists – Many tutorials still show advertising without plist modifications, leading developers to think the code alone is sufficient.
- Entitlement oversight – Junior engineers often forget to add the Multipeer capability in Xcode, especially when the app already works on iOS where the entitlement is sometimes auto‑granted.
By explicitly documenting the need for plist keys, entitlements, and privacy descriptions, senior engineers prevent this class of failures and ensure the app works reliably after OS updates.