Hi! I'm also having problems with CFNetwork in watchOS 6 beta 6. I'm using URLSessionWebSocketTask and the app seems to crash because it's missing access to something in the CFNetwork framework.
This is a simplified version of my code:
let url = URL(string: “ws://127.0.0.1:8080”)!
let urlSession = URLSession(configuration: .default)
let task = urlSession.webSocketTask(with: url)
self.webSocketTask = task
task.resume()
(I've set up a local websocket server, but also tried with public websocket 'echo' servers)
When trying to connect with the code above, the app crashes and I don't get any error messages in the "Debugger output", but I do get the following output in the "Debug navigator":
CFNetwork`___lldb_unnamed_symbol9369$$CFNetwork:
[... Lots of instructions ....]
os_log_type_enabled
0x4286c54a <+446>: testb %al, %al
0x4286c54c <+448>: jne 0x4286c6b3 ; <+807>
0x4286c552 <+454>: movl %esi, (%esp)
0x4286c555 <+457>: calll 0x428e87de ; symbol stub for: objc_release
0x4286c55a <+462>: movl -0x30(%ebp), %eax
0x4286c55d <+465>: movl 0x250292bf(%eax), %eax
0x4286c563 <+471>: movl (%ebx,%eax), %eax
-> 0x4286c566 <+474>: movl (%eax), %ecx
[... Lots of more instructions ....]
And on the left hand side in xcode, it says
0___lldb_unnamed_symbol9369$$CFNetwork
I've tried lots of things like variations on the code, trying to import the CFNetwork framework with no luck.
If I understand this correctly "lldb_unnamed_symbol" is becuase the app is missing a library it's trying to use.
So it seems to me like the implementation of URLSession (which is new in watchOS 6) is incomplete in some way that's connected to the CFNetwork framework
Any Apple people here to help out?