Compile for 10.6

I do my development on 10.7.x. However, I’d like my app used on 10.6 machines. In Xcode, I changed “Mac OS X Deployment Target” to 10.6.

However, it crashes on open (showing crash log) showing “NSInvalidUnarchiveOperationException”. reason: NSKeyedUnarchiver decodeObjectForKey: cannot decode object of class (NSLayoutConstraint).

It does run fine on 10.7… So what’s the deal to make it work with 10.6.x? It’s just basic applescript stuff I’ve learned from Shane’s book.


NSLayoutConstraint is not available in 10.6.
The used API in your application must be compatible to the deployment version
or you must implement a system version check in code to make sure that the 10.7 only API won’t be called in 10.6

NSLayoutConstraint could also be a setting in Interface Builder > Size Inspector


You can uncheck the option “Use Auto Layout” in the IB’s file inspector of your xib file.


The Swiss come to the rescue again. Thanks, Guys. It’s good now.