Thanks Quinn!
Switching to the asynchronous activate function is exactly what fixed it.
For other readers, here's the commit with the fix: https://github.com/leptos-null/WatchOS-WebSocket/commit/57d5899965063962d9fdf73b379e562658fa0084
Comments from the commit copied here for convenience:
in my testing on watchOS 26.6 (on both an Apple Watch Series 7 and Series 10 with the same results), the synchronous AVAudioSession.setActive() version of this method does not throw, however calling the synchronous version is not sufficient to enable use of WebSockets.
Additional note:
[quote='899752022, DTS Engineer, /thread/773362?answerId=899752022#899752022']
when I start my audio session, watchOS presents its Connect a Device UI.
[/quote]
In my testing, this UI only presents if you pass .longFormAudio to policy in the setCategory call, which was not required for WebSockets to become available to the process.
Topic:
App & System Services
SubTopic:
Networking
Tags: