Alex Rivera | Logout

this class is not key value coding-compliant for the key authView

Asked 2011-02-24T19:12:56.957
11

When i run my app on simulator it runs well, when i try with device doesn't work and i get these errors:

NOTE: i didn't find any kind of class authView in my code

2011-02-24 12:04:14.472 TestP[473:307] *** Terminating app due to uncaught exception     'NSUnknownKeyException', reason: '[<TestP 0x19d2b0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key authView.'
*** Call stack at first throw:
(
0   CoreFoundation                      0x33ac0987 __exceptionPreprocess + 114
1   libobjc.A.dylib                     0x3347b49d objc_exception_throw + 24
2   CoreFoundation                      0x33ac0705 -[NSException dealloc] + 0
3   Foundation                          0x3367db4f -[NSObject(NSKeyValueCoding)    setValue:forUndefinedKey:] + 182
4   Foundation                          0x3367d03b _NSSetUsingKeyValueSetter + 90
5   Foundation                          0x3367eda3 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 194
6   Foundation                          0x33630b17 -[NSObject(NSKeyValueCoding) setValue:forKeyPath:] + 130
7   UIKit                               0x3224c60f -[UIRuntimeOutletConnection connect] + 66
8   CoreFoundation                      0x33a63fc7 -[NSObject(NSObject) performSelector:] + 18
9   CoreFoundation                      0x33a6cd51 -[NSArray makeObjectsPerformSelector:] + 388
10  UIKit                               0x3224b577 -[UINib instantiateWithOwner:options:] + 586
11  UIKit                               0x3224cb39 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 92
12  UIKit                               0x3209e871 -[UIApplication _loadMainNibFile] + 96
13  UIKit                               0x3209a1fd -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 180
14  UIKit                               0x3206648b -[UIApplication handleEvent:withNewEvent:] + 1114
15  UIKit                               
Edit
Report

1 Answer

11

@Dave DeLong pointed out right.

Workaround

  • Find when the exception thrown, which viewController is being loaded.
  • Then check the nib file of the viewController, there must be an IBOutlet attached in xib but might be missed in the viewController.h file or might be some control which was attached is missing in xib file.

Why running in Simulator? Sometimes it ends in messing up.

Just do the steps

  1. Build -> Clean
  2. Build -> Clean All Targets

Now it runs the real code, may be issue got resolve on device also or may be it start throwing exception on simulator also in case if there is really an issue. (I already have mentioned workaround)

answered 2011-02-24T20:06:04.657

Your Answer