fix(macos/packaging): add NSLocalNetworkUsageDescription so Bonjour can register#5186
Merged
ReenigneArcher merged 1 commit intoMay 26, 2026
Conversation
…an register Modern macOS denies Bonjour service registration with -65570 (kTCCServiceErr_PolicyDenied) when an app advertises NSBonjourServices but does not also declare NSLocalNetworkUsageDescription. The OS treats the missing key as opt-out and never prompts the user, so the Sunshine mDNS announcement silently fails and Moonlight cannot auto-discover the host. Adding the usage-description key lets macOS prompt for Local Network access on first launch and allow DNS-SD registration to succeed.
b5b58d8 to
0eb77b6
Compare
|
Bundle ReportBundle size has no change ✅ |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #5186 +/- ##
==========================================
- Coverage 17.79% 17.78% -0.01%
==========================================
Files 111 111
Lines 24143 24143
Branches 10687 10687
==========================================
- Hits 4296 4294 -2
+ Misses 15471 14680 -791
- Partials 4376 5169 +793
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report in Codecov by Sentry.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
src_assets/macos/build/Info.plist.indeclaresNSBonjourServiceswith_nvstream._tcpso the host can advertise itself for Moonlight auto-discovery, but it does not declareNSLocalNetworkUsageDescription. On macOS 14+ this combination causes mDNS service registration to fail with error-65570(kDNSServiceErr_PolicyDenied):Apple's Local Network privacy gate treats the missing usage-description key as an implicit opt-out: the OS never prompts the user for permission, and
DNSServiceRegisterreturnsPolicyDeniedsilently. The Bonjour record is never broadcast, so stock Moonlight clients can't auto-discover the server (users have to add the host by IP manually).Add a usage description so macOS prompts on first launch and allows the DNS-SD registration to succeed once the user grants Local Network access.
After this change, the startup log shows:
instead of the
-65570error, and Moonlight on iOS / Apple TV / macOS finds the host automatically over Bonjour.Screenshot
N/A — Info.plist key addition.
Issues Fixed or Closed
Roadmap Issues
Type of Change
Checklist
AI Usage