Reputation: 111
I keep getting this error on my app. The only time I get the error is when I resume the app from a background state. I need some help figuring out where the error lies. It happens every time I go from background to active, no matter what the active ViewController is.
Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<__NSCFString 0xc063200> valueForUndefinedKey:]: this class is not key value coding-compliant for the key response.'
Upvotes: 2
Views: 5126
Reputation: 10296
It sounds like somewhere in the stack, a non-existant key is being accessed on an NSString. valueForUndefinedKey
is part of Key-Value Coding in Objective-C and is part of NSObject. It can be called when valueForKey:
doesn't work out on pretty much any object.
I see that exception thrown the most often when either:
Setup an exception breakpoint on All Exceptions in Xcode's Breakpoint Navigator so you can find the exact line in your codeNSUnknownKeyException
is being thrown on. Press the (+) to bring up the menu.
Upvotes: 5