user1763851
user1763851

Reputation: 1

'NSUnknownKeyException'

I try to do very simple application for ios. Switching between viewes. And when it started this error in log:

Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIApplication 0x712d520> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key goToAuthorizeView.'
*** First throw call stack:
(0x1c8c012 0x10c9e7e 0x1d14fb1 0xb76711 0xaf7ec8 0xaf79b7 0xb22428 0x22e0cc 0x10dd663 0x1c8745a 0x22cbcf 0x22e98d 0x10ceb 0x11002 0xfed6 0x21315 0x2224b 0x13cf8 0x1be7df9 0x1be7ad0 0x1c01bf5 0x1c01962 0x1c32bb6 0x1c31f44 0x1c31e1b 0xf7da 0x1165c 0x1b6d 0x1a95)
libc++abi.dylib: terminate called throwing an exception

Upvotes: 0

Views: 3168

Answers (2)

gunas
gunas

Reputation: 1907

just go to iOS Simulator > Reset Content and Setting. clean and run your app. it will work.

Upvotes: 0

CodaFi
CodaFi

Reputation: 43330

It looks like you have some kind of control (Most likely a UIButton) defined in the XIB that a phantom connection exists to. Check your XIB and make sure that any outlet named goToAuthorizeView are disconnected.

When the NIB un-archiver defrosts your UI, it starts calling -setValue:ForKey on the elements defined in the archive. When it comes across an undefined key, or value, it throws a generic exception, because it's not safe to set a random undefined space of memory to a new value.

Upvotes: 2

Related Questions