SDWebImage / SDWebImageAVIFCoder

A SDWebImage coder plugin to support AVIF(AV1 Image File Format) image
MIT License
55 stars 14 forks source link

'avif/avifs.h' file not found #33

Closed quentinfasquel closed 2 years ago

quentinfasquel commented 2 years ago

With a simple iOS project on Xcode, adding the package, adding the library on the target, adding "import" in code, using... getting a build issue that's just that.

dreampiggy commented 2 years ago

CocoaPods ? Or SwiftPM

Provide a simple demo is better.

mokemoko commented 2 years ago

I encountered the same problem with SwitfPM. The error occurred in here (https://github.com/SDWebImage/SDWebImageAVIFCoder/blob/master/SDWebImageAVIFCoder/Classes/SDImageAVIFCoder.m#L16). Perhaps it is typo with avif/avif.h?

dreampiggy commented 2 years ago

Not typo. The old version of libavif, has a public header avifs.h, which means AVIF Sequence.

It include the animated avif (in draft) structure and enum declarations. I used one of them in the source code :)

Seems when I update the libavif itself, it rename this file, I'll try to make compatible with the new avif version.

dreampiggy commented 2 years ago

Oh, seems actually typo. The avifs.h already been renamed in old version and I use that avif.h umbrella header instead. Seems the else case of #if __has_include(<libavif/avif.h>) fail in SwiftPM and run into this.

dreampiggy commented 2 years ago

@quentinfasquel @mokemoko Fix build issue in v0.9.2