Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

App crash on iOS 5 - Could not instantiate class named NSLayoutConstraint

My app is working very fine on iPhone and Simulator with iOS 6, but when i try to run on iPhone/Simulator with iOS 5 the app crashes

The error is:

Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named NSLayoutConstraint'

I'm not using Autolayout on Interface Builder Document.

Could anyone help me?

Autolayout is not checked

like image 862
Nathan Hegedus Avatar asked Oct 26 '12 19:10

Nathan Hegedus


2 Answers

make sure you have unselected use autolayout in interfacebuild

enter image description here

like image 158
abhishekkharwar Avatar answered Oct 30 '22 04:10

abhishekkharwar


You've been burned. NSLayoutConstraint only exists on iOS 6. You have to check to see if it's there, and if it's not, you have to do something else.

like image 31
Owen Hartnett Avatar answered Oct 30 '22 04:10

Owen Hartnett