TN3135: Low-level networking on watchOS

Learn about the supported use cases for low-level networking on watchOS.

View Technote TN3135 >

Post not yet marked as solved Up vote post of Jason Down vote post of Jason
1.4k views

Replies

I have been trying to write a standalone watchOS app which can monitor network state and interact using http (not https) with the local router on the wifi network. URLSession is failing if there is not an active connection to the internet beyond the router.

The low level networking TN implies that the only way I can do this is to start an audio stream. However the FAQ doesn't clarify what exactly api must be called (and/or capabilities or entitlements required) to enable NWBrowser or NWConnection to function.

Please could you clarify exactly how low level networking can be enabled in a standalone watchOS app ?

Thanks Guy

At the bottom of TN3135 you’ll find a link to a WWDC session that explains the stream audio exception in more detail.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Hello folks!

We ended up running into the same problem. We ported an existing VoIP SIP stack to watchOS and were happy that we progressed so quickly.

The initial feasibility study was passed. The stack runs on simulator and could register with our SIP server and accept incoming calls. PushKit and CallKit integration functional!

Very frustrated we now have to realize that with the information from TN3135 we can actually stop the project. The VoIP SIP stack (baresip) is heavily intertwined with the use of TPC/UDP/RTP sockets. The effort to change the communication to the low-level Network Framework makes no economic sense.

Even more frustrating was the fact that the BSD headers are included in the WatchOS SDK. Without this, we would certainly have encountered the problem much earlier. We wouldn't have been able to compile the SIP stack in the first place.

Is there still a small chance that Apple will change its policy in the future?

A frustrated developer Dietmar