Terminating app due to uncaught exception 'NSUnknownKeyException'

170 Views Asked by At

I keep getting this error when running my application in Xcode 4.5.:

Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key Garage.' * First throw call stack:

Does it mean that there is something declared as Garage in my ArmyViewController?

Thanks in advance for those who answer.

1

There are 1 best solutions below

1
BonanzaDriver On

If you are having trouble finding where the exception is being thrown then do the following:

From the Breakpoint Navigator (7th icon) you will notice down towards the bottom of your Xcode IDE 3 little icons (plus, minus, and checkbox) along with a search field. Click on the "+" plus icon, which will display a small popup menu .... choose "Add Exception Breakpoint."

Now, re-run your application again and notice where the code stops ... your exception is coming from there (i.e., the callstack).