Socket.io-client-swift: Swift Compiler Error

Created on 17 Nov 2017  路  5Comments  路  Source: socketio/socket.io-client-swift

Maybe I updated to High Sierra and then suddenly Xcode raised up compiler error

SocketIOClient.Swift line 82
private lazy var logType = "SocketIOClient{(nsp)}"
(Cannot use instance member 'nsp' within property initializer; property initializers run before 'self' is available)

SocketEngine.Swift line 199
if let data = Data(base64Encoded: noPrefix, options: .ignoreUnknownCharacters) {
(Value of optional type 'String?' not unwrapped; did you mean to use '!' or '?'?)

SocketEngine.Swift line 663
func setConnected(_ value: Bool) {
(Method 'setConnected' with Objective-C selector 'setConnected:' conflicts with setter for 'connected' with the same Objective-C selector)

My mac os version is 10.13.1 and SocketIOClient-Swift 13.0.1

Most helpful comment

I am facing the same problem.
Using -
Xcode 9.3 on MacOS 10.13.5.
Socket.IO-Client-Swift 13.2.0
Swift language version 4.1

Have you come up with any solution so far?

All 5 comments

Sounds like you're not using the latest Swift version.

I come into the same problem.

I am facing the same problem.
Using -
Xcode 9.3 on MacOS 10.13.5.
Socket.IO-Client-Swift 13.2.0
Swift language version 4.1

Have you come up with any solution so far?

same problem

same problem

Was this page helpful?
0 / 5 - 0 ratings