tidwall/SwiftWebSocket

Type 'RunLoop' has no member 'Mode'

adnanafzal565 opened this issue · 5 comments

Hello everyone.

I am getting this error "Type 'RunLoop' has no member 'Mode'" when I copy the file "WebSocket.swift" in my project.

I am using XCode Version 9.4.1 Mac OS High Sierra 10.13.4
Any help will be highly appreciated. Thanks.

I get the same error when upgrading to swift 4.2/5.0 & XCode 10.2. I build using Cocoapods, which gets SwiftWebSocket version 2.7.

that's because the author made code changes, but did not release a new version to the cocoapods master repo:
https://github.com/CocoaPods/Specs/tree/9543734012238c33ea018af5a4381459c13f0916/Specs/2/c/d/SwiftWebSocket

No updated version... ... Is there any other good swift web socket library ??

@yhz82415 you could have a lookt at Starscream https://github.com/daltoniam/Starscream

Cocoapods is not the lasted. Just modify is by yourself.
change
RunLoopMode.defaultRunLoopMode
to
RunLoop.Mode.default