tidwall / SwiftWebSocket

Fast Websockets in Swift for iOS and OSX
MIT License
1.53k stars 247 forks source link

Type 'RunLoop' has no member 'Mode' #140

Open adnanafzal565 opened 5 years ago

adnanafzal565 commented 5 years ago

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.

melvindesilva65 commented 5 years ago

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.

FormsOverVNC commented 5 years ago

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

yhz82415 commented 5 years ago

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

bielikb commented 5 years ago

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

Aaronwang81 commented 5 years ago

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