-
Notifications
You must be signed in to change notification settings - Fork 57
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
Hostname for iOS #16
Comments
FYI, |
Is RxDnssd have the same problem? |
That issue with Android has nothing to do JmDNS or Apple's Dnssd. |
Oh, I see. |
done |
from @bugnano
|
@bugnano 1 - This plugin registers services on all available interfaces (except loopback addresses). 2 - There is no easy way either to determine which interfaces/addresses are Wifi (Ethernet seems to work on ios devices too) and which are cellular. |
Is it possible to add a resolved hostname of the service into the watch callback?
So that I would be possible to build an URL like
"http://"+service.host+":"+service.port
(e.g. to gethttp://myserver.local:8080
) instead of looking up the right IP from the addresses array.If I'm right, there should already the right thing, which could be passed into the service object of the callback:
https://developer.apple.com/reference/foundation/netservice/1413300-hostname
However, I'm not (yet) familiar with swift/objective-c, so I could not implement it myself :(
Android has this already in the property "service.server", but iOS not.
Background story:
the server, which publishes the service, has IPv6 & IPv4 and sometimes the zeroconf plugin only receives the IPv6 address (sometime only IPv4 and sometime both). Since I use the IP for opening an InAppBrowser and the InAppBrowser cannot handle URLs with IPv6 addresses, I cannot connect to the server. Therefore, a hostname would be working - regardless of the type of IP and the underlaying network type (v6 or v4). Furthermore, Apple has also a new requirement that forces the usage of IPv6, so it would be better to use the hostname and let the local DNS resolving the IP address instead of using the IP directly.
The text was updated successfully, but these errors were encountered: