0

I creating a simple websocket session. It append only during the first call of the function initConnection. Everything work fine but I am affraid to have issues on real device despite what I have read. It seems to come from websocket.resume().

My code ->

func initConnection()
    {
        if let url = URL(string: "wss://irc-ws.chat.twitch.tv:443")
        {
            let urlSession = URLSession(configuration: .default)
            webSocketTask = urlSession.webSocketTask(with: url)
        }
        guard let websocket = webSocketTask else {
            print(" Error Init : WebSocket init Failed")
            onError()
            return
        }
        
        websocket.resume()
        currentChannels = []
        receiveMessage()
        sendMessage("CAP REQ : twitch.tv/tags")
        sendMessage("PASS " + botProfil.account)
        sendMessage("NICK " + botProfil.username)
    }

The log ->

2022-12-07 19:25:15.056322+0100 WatchOS-Twitch-Chat Watch App[8082:121266] []
nw_protocol_get_quic_image_block_invoke dlopen libquic failed: dlopen(/usr/lib/libquic.dylib,
 0x0005): tried: 
'/Users/quentinjeanningros/Library/Developer/Xcode/DerivedData/WatchOS-Twitch-Chat-cvwsrdgjhxgwscbhytrlcgcgrbjx/Build/Products/Debug-watchsimulator/libquic.dylib' (errno=2),
'/Users/quentinjeanningros/Library/Developer/Xcode/DerivedData/WatchOS-Twitch-Chat-cvwsrdgjhxgwscbhytrlcgcgrbjx/Build/Products/Debug-watchsimulator/libquic.dylib' (errno=2), 
'/Library/Developer/CoreSimulator/Volumes/watchOS_20S75/Library/Developer/CoreSimulator/Profiles/Runtimes/watchOS 9.1.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/introspection/libquic.dylib' (errno=2), 
'/Library/Developer/CoreSimulator/Volumes/watchOS_20S75/Library/Developer/CoreSimulator/Profiles/Runtimes/watchOS 9.1.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libquic.dylib' (errno=2),
'/usr/lib/libquic.dylib' (errno=2, not in dyld cache)

How clean can I clean my code to remove this logs ?

grougrou
  • 1
  • 2

0 Answers0