SDWebImage / SDWebImageSwiftUI

SwiftUI Image loading and Animation framework powered by SDWebImage
https://sdwebimage.github.io/SDWebImageSwiftUI
MIT License
2.21k stars 230 forks source link

'WebImage' cannot be constructed because it has no accessible initializers #68

Closed ozumado closed 4 years ago

ozumado commented 4 years ago

Hello there,

Recently I started to see this error 'WebImage' cannot be constructed because it has no accessible initializers The project does compile properly but its annoying the error is here all the time.

dreampiggy commented 4 years ago

The initializer is public init(url: URL?, options: SDWebImageOptions = [], context: [SDWebImageContextOption : Any]? = nil). See documentation and code.

What does you mean the no accessible initializers ?

dreampiggy commented 4 years ago

And, could you try the latest version https://github.com/SDWebImage/SDWebImageSwiftUI/releases/tag/0.10.0 as well ? Or providing me a demo to reproduce this issue.

ozumado commented 4 years ago

Thank You for the fast response. I've been using this package for few days already and didn't have any problem at all, yesterday it started to throw this error, the funny thing is it does compile and work as intended.

Screenshot 2019-12-6 o 17 28 33

ozumado commented 4 years ago

And yes, I'm currently at the most recent versions 0.10.0 and 5.4.0.

dreampiggy commented 4 years ago

And yes, I'm currently at the most recent versions 0.10.0 and 5.4.0.

Did you try to clear all the DerivedData (~/Library/Developer/Xcode/DerivedData/) ? Then restart Xcode to see the result.

Or, does the version 0.9.0, 0.8.x version contains the same strange warning ?

ozumado commented 4 years ago

Did you try to clear all the DerivedData (~/Library/Developer/Xcode/DerivedData/) ? Then restart Xcode to see the result.

Looks like this fixed my problem, sorry to bother you with such a silly issue.

dreampiggy commented 4 years ago

:) It's OK...