SDWebImage / SDWebImageLinkPlugin

A SDWebImage loader plugin, to support load rich link image with LinkPresentation framework
MIT License
17 stars 2 forks source link

Is there a way to make this work on iOS 11 just able to run the app? #19

Open sainttail opened 3 years ago

sainttail commented 3 years ago

On iOS 13+ and 12+, this work fines I have a code to check for availibity of LinkPresentation framework and will use it accordingly but when it runs on iOS 11. It always crash with this error

dyld: Library not loaded: /System/Library/Frameworks/CoreServices.framework/CoreServices
  Referenced from: /private/var/containers/Bundle/Application/9B5B8EC3-7997-432C-8A00-52EB387BA45F/eko.app/Frameworks/SDWebImageLinkPlugin.framework/SDWebImageLinkPlugin
  Reason: image not found

Is there a way for us to make this work? on iOS 11

PS. I can't seem to find where we link against CoreService in this lib and I am using Carthage as dependency manager

dreampiggy commented 3 years ago

Use weak linking. See readme like https://github.com/SDWebImage/SDWebImageSwiftUI#using-for-backward-deployment-and-weak-linking-swiftui. Or I can update readme as well.

Other Linker Flags: -weak_framework LinkPresentation -framework CoreServices

dreampiggy commented 3 years ago

Seems there are no CoreServices on iOS 11.

Apple rename MobileCoreServices to CoreServices start with iOS 12 :)

So this cause issue. Can you try to use source files to compile instead of pre-build binary ? Because clang compiler will know this suck and provide fallback.

Or our framework has to change source code to use MobileCoreServices instead.

sainttail commented 3 years ago

To give you update using Carthage --no-use-binaries option still does not solve the problem.

What was work for me is to copy the source code and make it as part of the project instead.