NSInvalidUnarchiveOperationException: Could not instantiate class named NSLayoutConstraint

By default, when you create a new iOS project in Xcode 4.5, your storyboard or XIB is set to use Autolayout, which is a new feature in iOS 6.0. The NSLayoutConstraint class is part of the Autolayout system, and it doesn’t exist in older versions of iOS.

If you want to deploy your app to an older version of iOS, you need to change your storyboard or XIB to not use Autolayout. It’s a checkbox in the File Inspector:

turning off autolayout

Leave a Comment