Hello,
I'm working on an Apple Watch/ iPhone/PC/Mac OS sport applications with different types of connectivity and i'm a bit stuck with the bellow issue.
I'm trying to Resolve a Bonjour that is using NWBrowser on WatchOS 8.6 on Apple Watch SE with LTE and i encounter strange issues:
First i'm setup a NWBrowser :
NWBrowser(for: .bonjourWithTXTRecord(type: "_angry._tcp", domain: nil), using: parameters)
Then, using :
browser?.browseResultsChangedHandler = { [weak self] results, changes in
Everything works well until here
I'm gathering info form name and txt of the service found and ask the client if i want's a connection to service found . Using NWConnection to connecting to the found enpoint:
NWConnection(to: endpoint, using: params)
Here starts the issue In the stateUpdateHandler :
connection?.stateUpdateHandler = { state in
switch state {
case .ready:
if let innerEndpoint = connection?.currentPath?.remoteEndpoint,
case .hostPort(let host, let port) = innerEndpoint {
i'm checking the port
and host
where i'm getting the wrong informations, an IPV6 and a port that don't exists on the target server and a log in the console :
2022-05-22 15:54:33.146148+0300 WatchKit Extension[956:609596] [] nw_endpoint_proxy_copy_synthesized_url Endpoint type is not an address or host, cannot synthesize URL
2022-05-22 15:54:33.319537+0300
WatchKit Extension[956:609596] [] nw_endpoint_proxy_match_exception_to_endpoint Invalid proxy endpoint type 3 for matching
2022-05-22 15:54:33.319604+0300
WatchKit Extension[956:609596] [] nw_endpoint_proxy_match_exception_to_endpoint Invalid proxy endpoint type 3 for matching
2022-05-22 15:54:33.319621+0300
WatchKit Extension[956:609596] [] nw_endpoint_proxy_match_exception_to_endpoint Invalid proxy endpoint type 3 for matching
2022-05-22 15:54:33.319636+0300
WatchKit Extension[956:609596] [] nw_endpoint_proxy_match_exception_to_endpoint Invalid proxy endpoint type 3 for matching
2022-05-22 15:54:33.319651+0300 WatchKit Extension[956:609596] [] nw_endpoint_proxy_match_exception_to_endpoint Invalid proxy endpoint type 3 for matching
2022-05-22 15:54:33.501821+0300 WatchKit Extension[956:609596] [] nw_endpoint_proxy_match_exception_to_endpoint Invalid proxy endpoint type 3 for matching
2022-05-22 15:54:33.501875+0300 WatchKit Extension[956:609596] [] nw_endpoint_proxy_match_exception_to_endpoint Invalid proxy endpoint type 3 for matching
2022-05-22 15:54:33.501892+0300 WatchKit Extension[956:609596] [] nw_endpoint_proxy_match_exception_to_endpoint Invalid proxy endpoint type 3 for matching
2022-05-22 15:54:33.501908+0300 WatchKit Extension[956:609596] [] nw_endpoint_proxy_match_exception_to_endpoint Invalid proxy endpoint type 3 for matching
2022-05-22 15:54:33.501923+0300 WatchKit Extension[956:609596] [] nw_endpoint_proxy_match_exception_to_endpoint Invalid proxy endpoint type 3 for matching
I tried this on an apple watch simulator and a couple of real iPhone devices and everything works well, i'm getting the good port
and host
and no console errors/warnings.
PS: All this are done during a running HKWorkoutSession
to ensure that the app is kept active during different networking operations.
What i'm doing wrong since is working fine on iPhone and WatchOS Simulator?
Thanks , Angry Software