Take the 2-minute tour ×

When I use a test device running ios 5.1.1 I get sigabrt. I think i need code which is compatible with ios 5.

When using an exception breakpoint it stops at this line of code.

[self.window makeKeyAndVisible];

Here is code in my appDelegate. I haven't done much in my viewController except add a button.

    // Override point for customization after application launch.
    self.viewController = [[JHNViewController alloc] init];
    self.window.rootViewController = self.viewController;
    [self.window makeKeyAndVisible];
    return YES;

If you can make any sense of this then please explain cause it doesn't mean anything to me.

2013-03-08 08:53:38.367 HelloWorld[66084:707] * Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named NSLayoutConstraint' * First throw call stack: (0x30fe688f 0x37324259 0x30fe6789 0x30fe67ab 0x3095854d 0x309586bb 0x30958423 0x308e9001 0x308573c7 0x30734c59 0x306aac17 0x306a9461 0x3069be87 0x3070c7d5 0x44281 0x306a9cab 0x306a37dd 0x30671ac3 0x30671567 0x30670f3b 0x32fb722b 0x30fba523 0x30fba4c5 0x30fb9313 0x30f3c4a5 0x30f3c36d 0x306a286b 0x3069fcd5 0x43fe1 0x43f68) terminate called throwing an exception(lldb)

share|improve this question
can you please paste the StackTrace of the Crash or the crash report? –  Rajan Balana Mar 8 '13 at 6:48
I've added it above. –  user1898829 Mar 8 '13 at 6:54
add comment

2 Answers

up vote 1 down vote accepted

As I can see, Autolayout is supported for iOS 6.0 + and you are making your app compatible with ios 5.1.1. then you need to remove the AutoLayout from your Viewcontroller's XIB.

Do one thing, the viewController which is your first viewController to be loaded on the app. Go to file Inspector of the XIB of that viewController. Remove AutoLayout Check. It will be fine.

Hope that helps!

share|improve this answer
I've unchecked autoresize subviews and it still gives same error. –  user1898829 Mar 8 '13 at 7:11
@user1898829 You don't have to uncheck Autoresize Subviews , Go to file inspector of that viewcontroller's XIB and uncheck the Use Autolayout option :) –  Rajan Balana Mar 8 '13 at 7:13
add comment

You should remove the Auto layout options from you .xib files in IB.

Auto layout is supported in iOS 6 + and your app complains that :

'Could not instantiate class named NSLayoutConstraint'

share|improve this answer
add comment

Your Answer


