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

when I running on iOS simulator by Xcode, I got a fatal error #50

Open
MorningStarJ opened this issue Jan 4, 2020 · 5 comments
Open

Comments

@MorningStarJ
Copy link

the console said:
dyld: Library not loaded: /usr/local/opt/webp/lib/libwebp.7.dylib Referenced from: /Users/username/Library/Developer/CoreSimulator/Devices/BDCB7B76-F51B-42D6-B6C2-0F8B66A889C6/data/Containers/Bundle/Application/EE7CB8B0-1477-43D8-B990-A0C8097B8C25/PracticeWebp.app/PracticeWebp Reason: no suitable image found. Did find: /usr/local/opt/webp/lib/libwebp.7.dylib: mach-o, but not built for iOS simulator

@ainame
Copy link
Owner

ainame commented Jan 15, 2020

@MorningStarJ Hi. What steps did you do to get that error?

@MorningStarJ
Copy link
Author

MorningStarJ commented Jan 19, 2020

@MorningStarJ Hi. What steps did you do to get that error?

add Swift-Webp to the project by SPM,.

import UIKit
import WebP

class ViewController: UIViewController {
    
    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view.
        let encoder = WebPEncoder()
        let queue = DispatchQueue(label: "do.something")
        queue.async {
            let data = try! encoder.encode(UIImage(named: "xxxx")!, config: WebPEncoderConfig.preset(WebPEncoderConfig.Preset.picture, quality: 100))
            print("encode successful")
        }
    }
}

run it on simulator, then the error is going to happen

@Reiszecke
Copy link

Did you get this fixed? I'd use SDWebImage but it seems kinda bloated for my use case as I only need the webp decrypt feature

@ainame
Copy link
Owner

ainame commented Jan 3, 2021

@Reiszecke No. I haven't worked on this project for a while. You are very welcome if you send me a patch to fix.
I haven't tested this with Swift Package Manager's installation yet so it's likely to be broken somewhere.

@maximkrouk
Copy link

+1

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

4 participants