Skip to content

fix: declare Multipeer's UDP Bonjour service and report Local Network access - #52

Merged
sheehanmunim merged 1 commit into
mainfrom
fix/multipeer-local-network
Oct 17, 2026
Merged

sheehanmunim merged 1 commit into
mainfrom
fix/multipeer-local-network

Conversation

@sheehanmunim

Copy link
Copy Markdown
Member

Found while testing Multipeer between an iPad and an iPhone. The two never found each other, and nothing reported an error.

Bonjour UDP entry

Multipeer Connectivity browses both _<serviceType>._tcp and _<serviceType>._udp. iOS's Local Network privacy blocks any service type missing from NSBonjourServices.

  • The config plugin, the README snippets and the example declared only _munim-mesh._tcp.
  • They now declare both. The plugin does this for every multipeerServiceTypes entry, and also accepts ._udp-suffixed input.

requestLocalNetworkPermission(timeoutMs?)

With Local Network access denied, Multipeer finds no peers and reports no error. iOS asks only once per app, so a denied app stays silent from then on.

  • The new call shows the prompt on first use. It resolves 'granted' | 'denied' | 'notDetermined' | 'unavailable' by publishing and browsing a private _munimbluetooth._tcp service, which the config plugin declares. This is the same probe munim-wifi ships.
  • Android resolves 'granted': Multipeer is Apple-only and BLE doesn't use the local network.
  • The example checks access before starting Multipeer and logs a warning with the Settings path if access is off.

Verified (Release builds)

  • iPad Air M3 (iPadOS 27.0.1) and iPhone 17 Pro: they connect over Multipeer about 2 s after launch with auto-invite, and exchange pings both ways (munim-mesh-ping). The check reports granted.
  • The plugin's Info.plist output was checked for the default, custom and disabled service-type settings.
  • tsc, bob build and nitrogen codegen pass.

The Android change is a one-liner and is compiled by CI only.

Also tested in the same session, with no code changes needed: L2CAP iPad → Galaxy A14 (PSM 192, payload received), Android Classic RFCOMM server and discovery, and BLE GATT with three devices (the iPhone as central against the iPad and the Galaxy).

🤖 Generated with Claude Code

… access

Multipeer Connectivity browses both _<serviceType>._tcp and
_<serviceType>._udp, and iOS's Local Network privacy blocks any service type
missing from NSBonjourServices. The config plugin, README and example
declared only the TCP entry; they now declare both.

With Local Network access denied, Multipeer finds no peers and reports no
error. requestLocalNetworkPermission(timeoutMs?) shows the prompt on first
use and resolves 'granted', 'denied', 'notDetermined' or 'unavailable' by
publishing and browsing the private _munimbluetooth._tcp service (ported
from munim-wifi; the config plugin declares it). Android resolves 'granted'.
The example checks it before starting Multipeer.

Verified on an iPad Air M3 (iPadOS 27.0.1) and an iPhone 17 Pro: the two
connect over Multipeer about 2 s after launch and exchange pings, and the
check reports granted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 17, 2026 03:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@sheehanmunim
sheehanmunim merged commit fcd1c0c into main Oct 17, 2026
3 checks passed
@sheehanmunim
sheehanmunim deleted the fix/multipeer-local-network branch October 17, 2026 04:00
sheehanmunim pushed a commit that referenced this pull request Oct 17, 2026
## [0.10.2](v0.10.1...v0.10.2) (2026-10-17)

### 🐛 Bug Fixes

* declare Multipeer's UDP Bonjour service and report Local Network access ([#52](#52)) ([fcd1c0c](fcd1c0c))
@sheehanmunim

Copy link
Copy Markdown
Member Author

🎉 This PR is included in version 0.10.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants