coreImage iOS 4.3.3 crash

2019-09-04 18:23发布

问题:

guys, I have iOS app, which running good on ios5.0, but on 4.3.3 it's crashing and writing this to console:

dyld: Library not loaded: /System/Library/Frameworks/CoreImage.framework/CoreImage
  Referenced from: /Users/IvanTrufanov/Library/Application Support/iPhone Simulator/4.3.2/Applications/99C63A08-CC3E-49B7-A27D-1352D61C7C4F/habr.app/habr
  Reason: image not found

Have you any ideas? What can be reason?

回答1:

Core Image is only available with iOS 5.

https://developer.apple.com/library/ios/#documentation/GraphicsImaging/Conceptual/CoreImaging/ci_intro/ci_intro.html



回答2:

As others note CoreImage requires iOS 5+. But you can still use CoreImage in apps supporting iOS 4.3 and below by weak linking against the framework.

To do this go to your project's build phases, find the "CoreImage.framework" reference and change the optional/required flag to optional.

Of course the CoreImage API won't be available prior to iOS 5, so you'll want to check the OS version before making any framework calls. You might find the following macros handy: https://stackoverflow.com/a/5337804/82169