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

Swift 4 issue #474

Closed
adrian-niculescu opened this issue Feb 27, 2018 · 4 comments
Closed

Swift 4 issue #474

adrian-niculescu opened this issue Feb 27, 2018 · 4 comments

Comments

@adrian-niculescu
Copy link

Using CocoaPods 1.4.0 I set the swift-version in my .podspec file to 4 liek so:
s.swift_version = '4.0'

When compiling, I get the following warning:
- WARN | xcodebuild: Starscream/Sources/WebSocket.swift:125:5: warning: 'weak' should not be applied to a property declaration in a protocol and will be disallowed in future versions

this refers to the WSStream protocol:

public protocol WSStream {
    weak var delegate: WSStreamDelegate? {get set}
    ....
}

See this discussion on Stack Overflow about this kind of issue:

@acmacalister
Copy link
Collaborator

How are you getting this warning? I haven't seen this in Xcode Version 9.2 (9C40b), with the compiler set to Swift 4.0. Does anyone else receive this warning?

@chadham
Copy link

chadham commented Mar 24, 2018

Am getting the same warning from line:
125 weak var delegate: WSStreamDelegate? {get set} //'weak' should not be applied to a property declaration in a protocol and will be disallowed in future versions

Running Swift 4.0 on Xcode Version 9.3 beta (9Q98q)

@danylovaolha
Copy link

danylovaolha commented Mar 30, 2018

The same warning at the same line (Xcode 9.3)

@daltoniam
Copy link
Owner

daltoniam commented Apr 4, 2018

Version 3.0.5 has been released. It removed the weak and should fix this warning.
https://github.com/apple/swift-evolution/blob/master/proposals/0186-remove-ownership-keyword-support-in-protocols.md

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

5 participants