Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local swarm discovery not working on iOS #3038

Open
matheus23 opened this issue Dec 12, 2024 · 0 comments
Open

Local swarm discovery not working on iOS #3038

matheus23 opened this issue Dec 12, 2024 · 0 comments

Comments

@matheus23
Copy link
Contributor

Original user report:

Hello. I diagnosing an issue I am having with iroh 0.29 and LocalSwarmDiscovery. I have an app running 3 instances (on MacOS, iOS-Simulator, and an iPhone). Using endpoint.remote_info_iter() the Mac & iOS Simulator can see each other and the iPhone, however the iPhone does not receive mDNS registration for the other two (running on the Mac). I get this error spammed out in the iPhone log:

swarm_discovery::socket : error sending mDNS: No route to host (os error 65)

Any thoughts on why that may be? All devices are on the local LAN, iPhone via WIFI.

From googling around a bit, this seems to be due to apple restricting sending mDNS on iOS to apps that have an "entitlement" for this: https://developer.apple.com/documentation/bundleresources/entitlements/com.apple.developer.networking.multicast

Practically, this entitlement is going to be hard to get for every app developer. The alternative is to use higher-level APIs for service discovery, so the bonjour APIs directly. Specifically NWBrowser APIs seem to fulfill this role.

That said, them being high-level APIs probably means we're not going to have control over how discovery ends up happening there and can't make it work exactly like the algorithms in swarm-discovery.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

1 participant