Andrew Kinnie
Andrew Kinnie

Reputation: 297

iOS app with Storyboard crashing with *'NSInternalInconsistencyException', reason: 'The NIB data is invalid.'

We have an app built using iOS 6 sdk (deployable on iOS 5) using Storyboards which crashes in iOS 5 (only) with this error:

[myApp] * Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'The NIB data is invalid.'

The scene in question is a subclass of UITableViewController which contains a UITableView and an added UITextView property.

I have no idea what is invalid about this or why it works fine in iOS 6.

Any ideas?

PS: I saw what appeared to be a loosely similar question regarding nibs and creating custom cells which suggested turning off auto-layout, but this app uses storyboards, has static cells, and auto-layout is already off.

Upvotes: 4

Views: 7614

Answers (2)

Zennichimaro
Zennichimaro

Reputation: 5306

I'd suggest the following checklist

  1. make sure autolayout checkbox is not ticked
  2. in IB, goto File Inspector > Document Versioning > Deployment and make sure it is iOS 5.1 or lower, and > Development make sure it is Previous Version of XCode (XCode 4.5)
  3. change the File Type from [Default - Interface Builder Cocoa Touch XIB] to any other C source code or something, then go to other file and come back and change back to [Default - Interface Builder Cocoa Touch XIB]

The 3rd checklist has saved me a number of times.. AAPL really have very lame and buggy development tools

Upvotes: 4

joshOfAllTrades
joshOfAllTrades

Reputation: 1982

Be sure that you don't have "Use Autolayout" enabled for that view. It will throw that error when ran on anything older then ios 6.

Upvotes: 9

Related Questions