ainame / Swift-WebP

A thin libwebp wrapper in Swift that provides both encode/decode APIs
MIT License
163 stars 39 forks source link

Support installation via Xcode's built-in SPM #38

Closed ainame closed 4 months ago

s4cha commented 4 years ago

That would be very cool :) At the moment we get Could not build Objective-C module 'CWebP' and webp/encode.h' file not found error messages.

ainame commented 4 years ago

Thank you for giving it a try. I'll find a time to do that but any contributions for that is always welcomed.

userlerueda commented 4 years ago

Having the same error here.

trevor-e commented 4 years ago

Just gave this a try for an iOS app and get the following error:

building for iOS Simulator, but linking in dylib built for macOS, file '/usr/local/Cellar/webp/1.1.0/lib/libwebp.dylib' for architecture x86_64

which I think is because you are providing the dependency as a systemLibrary provided by .brew().

s4cha commented 3 years ago

Personally, I still get 'webp/encode.h' file not found & Could not build Objective-C module CWebP. SPM support would be really cool. In our iOS production app, we migrated all the previous Carthage-supported libraries (~20) to SPM and WebP is sadly the last one requiring us to keep Carthage. Let me know if I can help :)

s4cha commented 2 years ago

@ainame any news on this front ?

jnordberg commented 2 years ago

I intended to take a stab at fixing this but annoyingly the issue goes away for me when using a locally checked out version vs a git reference so I'm suspecting this is a bug in Xcode's SPM we just have to wait for Apple to resolve