Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[iOS] SocketEngine does not conform to protocol WebSocketDelegate #1495

Open
mobifly-dev opened this issue Jun 13, 2024 · 2 comments
Open

[iOS] SocketEngine does not conform to protocol WebSocketDelegate #1495

mobifly-dev opened this issue Jun 13, 2024 · 2 comments

Comments

@mobifly-dev
Copy link

mobifly-dev commented Jun 13, 2024

Hello,

could you add to the SocketEngine this code. The XCode has a problem without delegate compatibility during compilation and he does not respect the SocketEngine extension in line 762 for some reason.

public func didReceive(event: Starscream.WebSocketEvent, client _: Starscream.WebSocketClient) {
        switch event {
            case let .connected(headers):
                wsConnected = true
                client?.engineDidWebsocketUpgrade(headers: headers)
                websocketDidConnect()
            case .cancelled:
                wsConnected = false
                websocketDidDisconnect(error: EngineError.canceled)
            case let .disconnected(reason, code):
                wsConnected = false
                websocketDidDisconnect(error: nil)
            case let .text(msg):
                parseEngineMessage(msg)
            case let .binary(data):
                parseEngineData(data)
            case _:
                break
        }
    }
@bumios
Copy link

bumios commented Jul 4, 2024

I'm facing the same problem, after I ran pod install or pod update, the Starscream was being updated to 4.0.8 causing this issue. Back to the old Podfile.lock when it works when Starscream version (4.0.4).

Using: Socket.IO-Client-Swift (16.0.1)
My pod file:

pod 'Socket.IO-Client-Swift', '~> 16.0.0'

image

@sanketk2020
Copy link

sanketk2020 commented Jul 5, 2024

Hi
Starscream v(4.0.8) is causing this issue, to solve it,
Simply open your Podfile.lock file in text editor and then find the - Starscream (4.0.8) and change it's version 4.0.8 to 4.0.4 and save it and close it.
And then open terminal and in that run pod install command.

And that issue will be fixed.

From
- Starscream (4.0.8)

to
- Starscream (4.0.4)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants