SwiftWebSocket icon indicating copy to clipboard operation
SwiftWebSocket copied to clipboard

Errors after updating to swift 4

Open bj97301 opened this issue 8 years ago • 4 comments

I seem to be getting these errors after updating to swift 4: .../Pods/SwiftWebSocket/Source/WebSocket.swift:719:43: Extraneous argument label 'data:' in call .../Pods/SwiftWebSocket/Source/WebSocket.swift:726:47: Extraneous argument label 'data:' in call .../Pods/SwiftWebSocket/Source/WebSocket.swift:728:47: Extraneous argument label 'data:' in call .../Pods/SwiftWebSocket/Source/WebSocket.swift:732:47: Extraneous argument label 'data:' in call .../Pods/SwiftWebSocket/Source/WebSocket.swift:745:44: Extraneous argument label 'data:' in call .../Pods/SwiftWebSocket/Source/WebSocket.swift:747:44: Extraneous argument label 'data:' in call .../Pods/SwiftWebSocket/Source/WebSocket.swift:749:44: Extraneous argument label 'data:' in call .../Pods/SwiftWebSocket/Source/WebSocket.swift:1495:24: 'init(truncatingBitPattern:)' has been renamed to 'init(truncatingIfNeeded:)'

bj97301 avatar Sep 28 '17 22:09 bj97301

If I had to guess I believe it has something to do with the pod proj file specifying the swift version of 4 for the pod. Do you happen to have a swift 4 version available?

bj97301 avatar Sep 29 '17 01:09 bj97301

I have a pull request if your interested in it: https://github.com/tidwall/SwiftWebSocket/pull/103

I was too lazy to fix the warnings though.

bj97301 avatar Sep 29 '17 02:09 bj97301

I was also getting the same error. I had to change the Swift Language Version in Build Settings to 3.2.

shujaathaider avatar Oct 09 '17 06:10 shujaathaider

I use below pod to support swift 4.0 pod 'SwiftWebSocket', :git => 'https://github.com/tidwall/SwiftWebSocket.git', :branch => 'master'

Horse888 avatar Nov 25 '17 10:11 Horse888