Unable to set deployment target below OSX 10.8 (Error: dyld: library not loaded - Reason: incompatible library version)

I am trying to create and run an OSX application with Cocoa. However, when I try to set the deployment target to anything other than 10.8, I get a runtime error when the application tries to start:

dyld: Library not loaded: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices Referenced from: /Users/chris/Library/Developer/Xcode/DerivedData/Build/Products/Release/MyApp.app/Contents/MacOS/MyApp Reason: Incompatible library version: MyApp requires version 64.0.0 or later, but ApplicationServices provides version 1.0.0 

As far as I can tell, there is nothing in my application that uses anything from ApplicationServices.framework. I don’t even know why he will try to download this library.

For reference, I use several third-party frameworks, including Growl.framework (Growl 2.0), Sparkle.framework (Sparkle 1.5 b6) and MagicKit.framework (https://github.com/aidansteele/MagicKit)

+4
source share
3 answers

Answering my own question (after several hours of investigation):

Apparently, when contacting CoreGraphics.framework in my desktop application project, he triggered a runtime download request for version 10.8 for the ApplicationServices platform. Fortunately, I did not even use anything from CoreGraphics. Uninstall stopped the error while loading dyld.

+5
source

Make sure ApplicationServices.framework is added to the Link Binary With Libraries Phase on the Configure Phase tab.

+4
source

I got this error when trying to use characters in CoreGraphics and import <CoreGraphics / CGGeometry.h> directly, instead of the recommended <ApplicationServices / ApplicationServices.h> as stated in the documentation.

Believe it or not, even in 10.8, you still have to import AND bind ApplicationServices for this.

+3
source

All Articles