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.1 init #4

Closed
alfasolutions opened this issue Apr 5, 2018 · 3 comments
Closed

swift 4.1 init #4

alfasolutions opened this issue Apr 5, 2018 · 3 comments

Comments

@alfasolutions
Copy link

alfasolutions commented Apr 5, 2018

A compiler error after update to swift 4.1

'self' used in method call 'defaultConfiguration' before 'super.init' call !!!

public init(frame: CGRect = .zero, playerVars: [String: AnyObject]) {
    super.init(frame: frame, configuration: defaultConfiguration())
    
    commonInit()
    self.playerVars = playerVars
}

public init(frame: CGRect = .zero, playerVars: [VideoEmbedParameter] = []) {
    super.init(frame: frame, configuration: defaultConfiguration())
    
    commonInit()
    guard !playerVars.isEmpty else { return }
    var params: [String: AnyObject] = [:]
    playerVars.forEach {
        let property = $0.property
        params[property.key] = property.value
    }
    self.playerVars = params
}
@mzeeshanid
Copy link

I am also facing the same probelm :(

@rinov
Copy link
Owner

rinov commented Apr 13, 2018

Hi there, Thank you for your report an issue.
Sorry, This library is still not convertible with Swift 4.1 because i mainly use Swift 4 on my work, but i wanna fix it in near the future, or i'm very happy if you submit a pull request :).

@rinov
Copy link
Owner

rinov commented May 28, 2018

I've just fixed this issue at YoutubeKit (v0.2.0),
Thank you.

@rinov rinov closed this as completed May 28, 2018
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

3 participants