开发者

NSUnknownKeyException [duplicate]

开发者 https://www.devze.com 2023-02-06 03:36 出处:网络
This question already has answers here: Xcode - How to fix 'NSUnknownKeyException', reason: … this class is not key value coding-compliant for the key X" error?
This question already has answers here: Xcode - How to fix 'NSUnknownKeyException', reason: … this class is not key value coding-compliant for the key X" error? (78 answers) Closed 7 years ago.

iota(52046) malloc: recording malloc stacks to disk using standard recorder

iota(52046) malloc: process 52009 no longer exists, stack logs deleted from /tmp/stack-logs.52009.iota.ACGxkQ.index

iota(52046) malloc: stack logs being written into /tmp/stack-logs.52046.iota.X4vEf4.index

2011-01-24 12:49:59.519 iota[52046:207] Unknown class InterfaceAppDelegate in Interface Builder file.

2011-01-24 12:49:59.526 iota[52046:207] Unknown class InterfaceViewController in Interface Builder file.

2011-01-24 12:49:59.531 iota[52046:207] * Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key window.'

*** Call stack at first throw:
(
    0   CoreFoundation                      0x03122919 __exceptionPreprocess + 185
    1   libobjc.A.dylib                     0x032705de objc_exception_throw + 47
    2   CoreFoundation                      0x03122851 -[NSException raise] + 17
    3   Foundation                          0x00600c2b _NSSetUsingKeyValueSetter + 135
    4   Foundation                          0x00600b99 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 285
    5   UIKit                               0x00a7ad0a -[UIRuntimeOutletConnection connect] + 112
    6   CoreFoundation                      0x03098b6f -[NSArray makeObjectsPerformSelector:] + 239
    7   UIKit                               0x00a79721 -[UINib instantiateWithOwner:options:] + 1041
    8   UIKit                               0x00a7b4b5 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 168
    9   UIKit                               0x0088a9bb -[UIApplication _loadMainNibFile] + 172
    10  UIKit                               0x0088b90d -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 198
    11  UIKit                               0x00895452 -[UIApplication handleEvent:withNewEvent:] + 1958
    12  UIKit                               0x0088e074 -[UIApplication sendEvent:] + 71
    13  UIKit                               0x00892ac4 _UIApplicationHandleEvent + 7495
    14  GraphicsServices                    0x0361fafa PurpleEventCallback + 1578
    15  CoreFoundation                      0x03103dc4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
    16  CoreFoundation                      0x03064737 __CFRunLoopDoSource1 + 215
    17  CoreFoundation                      0x030619c3 __CFRunLoopRun + 979
    18  CoreFoundation                      0x03061280 CFRunLoopRunSpecific + 208
    19  CoreFoundation                      0x030611a1 CFRunLoopRunInMode + 97
    20  UIKit                               0x0088b226 -[UIApplication _run] + 625
    21  UIKit                               0x00896b58 UIApplicationMain + 1160
    22  iota                                0x00006b3e main + 116
    23  iota                                0x00006ac1 start + 53
)

terminate called after throwing an instance of 'NSException'

I am not able to understand what happened to my application all of a sudden. It is crashing all the time with this error. I created on more trial project by the name Interface and ran that a couple of times and after it when I went back to run my original project. It开发者_JS百科 is crashing consistently. Can anyone help me with it? Thanks


I also had the same issue.

Actually, I had created an outlet connection for a text. I named it "mytext", for some reasons i later decided to change the name and I deleted the @property declaration from the header.

As it turns out, the connection was deleted and the compiler kept on searching for "mytext".

I had to go into xib file and switch "connection explorer". It showed that "mytext" was still connected.

I removed the connection from there it started working.


2011-01-24 12:49:59.519 iota[52046:207] Unknown class InterfaceAppDelegate in Interface Builder file.
2011-01-24 12:49:59.526 iota[52046:207] Unknown class InterfaceViewController in Interface Builder file

the above says that your XIB is pointing to a class that does not exist in your project.

In Interface Builder check the class settings. All views and objects should be set to either a standard class or to a custom class that is part of your project. It could be a spelling error...

0

精彩评论

暂无评论...
验证码 换一张
取 消