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

Impossibile compiling due to Starscream 4.0.6 #558

Open
manfredipist opened this issue Oct 23, 2023 · 2 comments
Open

Impossibile compiling due to Starscream 4.0.6 #558

manfredipist opened this issue Oct 23, 2023 · 2 comments

Comments

@manfredipist
Copy link

manfredipist commented Oct 23, 2023

I can no longer compile the app as CocoaMQTT is downloading as incompatible version of Starscream (4.0.6) through Swift Package Manager

CocoaMQTT/Source/CocoaMQTTWebSocket.swift:459:1 Type 'CocoaMQTTWebSocket.StarscreamConnection' does not conform to protocol 'WebSocketDelegate'

`

extension CocoaMQTTWebSocket.StarscreamConnection: WebSocketDelegate {

public func didReceive(event: Starscream.WebSocketEvent, client: Starscream.WebSocket) {

    switch event {

    case .connected(let headers):

        delegate?.connectionOpened(self)

        break

    case .disconnected(let reason, let code):

        delegate?.connectionClosed(self, withError: nil, withCode: code)

        break

    case .text(let string):

        delegate?.connection(self, receivedString: string)

        break

    case .binary(let data):

        delegate?.connection(self, receivedData: data)

        break

    case .ping(_):

        break

    case .pong(_):

        break

    case .viabilityChanged(_):

        break

    case .reconnectSuggested(_):

        break

    case .cancelled:

        delegate?.connectionClosed(self, withError: nil, withCode: nil)

        break

    case .error(let error):

        delegate?.connectionClosed(self, withError: error, withCode: nil)

        break

    }

}
}

`

@hunganh0403
Copy link

i have the same issue, which can be worked around by add package with Starscream version 4.0.4
image

@leeway1208
Copy link
Collaborator

4.0.4 Starscream can run demo and build sdk well.
4.0.6 version has some problem. protocol issues

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