Closed Rexios80 closed 1 year ago
Can this be reproduced in XCode's watch simulator?
Unfortunately no
I don't have a physical Apple watch at hand to reproduce this, I will try to get one and see if I can reproduce it.
Could you make a minimal reproduction repo with a watch project? I haven't made one before, and when I add the NWWebsocket package to a watch project, I can't import it into my ContentView. I think it's because it's in an extension. I've used pure NWWebsocket in another iOS project before.
Sorry it took so long. I've been busy with a bunch of other things.
Also see https://developer.apple.com/forums/thread/714796 for a minimal repro of the watchOS 9 issue.
Also see that linked issue from the Firebase iOS repo. We might just be screwed 🙃
Welp I guess sockets on watchOS are dead
Yep, the evidence points to watchOS 9 strictly blocking low level networking.
It also mentions that the simulator doesn't enforce this, which explains why I couldn't reproduce this on the sim.
How do you want to handle this? Just remove watchOS support from the podspec and package manifest?
That, and I will modify the readme.
I've removed mention of watchOS from the Readme. I'm going to leave it in the other files in the off chance someone is using it in older versions of watchOS.
This is most definitely a watchOS issue, but I wanted to make it known and see if anyone here might have some insight into this. The exact same code using NWWebSocket works on watchOS 8, but on watchOS 9 I get:
I'm going to create a minimal reproducible example using the raw NWConnection library to see if I can learn anything, but considering how vague this error is I doubt I'll get very far. URLSessionWebSocketTask also broke in watchOS 9. Knowing that websockets are handled by the phone, I'm guessing that the phone part of watch websockets got broken.