Dear Apple Team,
I am facing an issue with UDP networking in my watchOS app for duplex audio streaming using NWConnection. I have already added the necessary capabilities, including background mode for audio, to ensure smooth operation.
Issue Details:
The UDP connection works fine on the simulator since it uses macOS networking and allows low-level access. However, on a real Apple Watch (running watchOS 10), the connection remains in a "waiting" state and fails with Error 50. I am aware of Technical Note TN3135 regarding low-level networking on watchOS, but even after following these guidelines, the issue persists.
Questions:
Does watchOS impose additional restrictions on UDP networking compared to iOS/macOS?
Are there any specific entitlements or configurations required to allow UDP connections on a real Apple Watch?
Is there a workaround or debugging method to get more insights into why the connection fails?
I would appreciate any guidance or recommendations on resolving this issue.
Did you watch WWDC 2019 Session 716 Streaming Audio on watchOS 6? I explains how the low-level networking capability is tied to the presence of an active audio session:
Once your application has an active audio session, all of the networking APIs are available to retrieve audio content.
I suspect that you’ve failed to set that up, and so low-level networking is blocked.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"