SDWebImage / SDWebImageAVIFCoder

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

libavif + rav1e not compatible with `use_frameworks!` dynamic linking #61

Closed mgenware closed 9 months ago

mgenware commented 9 months ago

A minimal reproducible podfile:

use_frameworks!

target 'test' do
  pod 'SDWebImageAVIFCoder'
  pod 'libavif', :subspecs => [
    'librav1e'
  ]
end

Run pod install, got the following error:

The 'Pods-test' target has transitive dependencies that include statically linked binaries (.../Pods/librav1e/Mac/librav1e.framework)
dreampiggy commented 9 months ago

by design. rav1e is just pre-built framework. You can grab that and directly use. No need CocoaPods

dreampiggy commented 9 months ago

rav1e does not support dynamic linking. And I'm still really disagreeing to use dynamic lib on iOS

Use

use_framworis!, :linkage => :static
dreampiggy commented 9 months ago

Actually, it's CocoaPods limit.

You can not use pre-built binary to support both dynamic linking and static linking switch. Which need two binaries or re-compile. not single one

But rav1e is Rust code, I don't want you as user to install Rust toolchain on your Mac

dreampiggy commented 9 months ago

I can update the README about this...

Done: https://github.com/SDWebImage/SDWebImageAVIFCoder/blob/master/README.md#rav1e-encoding

Actually, both HEIFCoder and AVIFCoder will use librav1e