Closed doihei closed 1 year ago
Is this __has_include
will become false and use #include "avif/include.h"
instead ? Works ?
I think this one seems a little strange, because for CocoaPods, it can only either contains headers dir like this
Public
- libavif
-- include
--- avif.h
--- internal.h
or this:
Public
libavif
- avif.h
- internal.h
So your changes does not explain the reason under the hood...
Which means, if I can import avif headers via
#include <libavif/avif.h>
I can always include another public headers like internal.h
via
#include <libavif/internal.h>
These two is Bijection...
Or another possible reason: The internal.h
is not public header, but the avif.h
is public header, they are different. Maybe you can provide your demo, or upload the folder strcture of your Pods
folder, using tree command (https://www.geeksforgeeks.org/tree-command-unixlinux/) to let me know what happends.
Thanks for looking at my fix.
Is it because libavif.podspec does not have internal.h
in the public header?
It happens even if you simply add this library in your Podfile. The following files will be the contents of Pods.
Also, the following URL will be the repository.
Seems correct. Currently the libavif-Xcode
(Our SDWebImage maintained wrapper)'s podspec shows:
s.subspec 'core' do |ss|
ss.source_files = 'src/**/*.{h,c,cc}', 'include/avif/*.h'
ss.public_header_files = 'include/avif/avif.h'
which should be fixed to
s.subspec 'core' do |ss|
ss.source_files = 'src/**/*.{h,c,cc}', 'include/avif/*.h'
ss.public_header_files = 'include/avif/*.h'
I'll submit new version (also bump libavif upstream dependency)
Tip: The internal.h
is actually public APIs, not some internal APIs :)
This issue only effect CocoaPods, the SwiftPM and Carthage already put both 2 headers files into public.
Our AVIF conversion use some of data structures to do RGB-YUV conversion
Fixed in https://github.com/SDWebImage/libavif-Xcode/pull/4 and should release new version (0.10.0/0.10.1)
I'll re-release libavif v0.10.1, because v0.11 changes breaks APIs, I doubt that it's suitable or not to just upgrade.
For this PR, I'll merge as well, and check AVIFCoder to compatible with v0.11
I got the following error in the source code I put in with Cocoapods. This fix solves it by adding a condition to the include statement.
Xcode: 13.4.1 CocoaPods: 1.11.3