1

I've been devastated last two days looking and reading about all kind of errors. And I found similar issues but when I try to fix mine, it never works.

I'm almost ready to submit my project and it was working amazing. However, suddenly when I try to run the code, it builds fine but when it runs, it stays on the launch image and then it crashes. I've tried it both on the simulator and the device, same thing.

Though, when it runs my Xcode takes me to this line which I absolutely understand, not.

#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char *argv[])
{
@autoreleasepool {
    return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}

It simply points there with no error than: Thread 1: signal SIGBRT

and the Output shows this:

2013-01-14 14:17:17.127 LSA[37852:c07] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIView 0x7141450> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key keyPath.'
*** First throw call stack:
(0x1c8f012 0x10cce7e 0x1d17fb1 0xb79711 0xafaec8 0xafa9b7 0x64573 0xb25428 0x49c7e4 0x10e0663 0x1c8a45a 0x22fbb3 0xf4e37 0xf5418 0xf5648 0xf5882 0x44a25 0x44dbf 0x44f55 0x4df67 0x11fcc 0x12fab 0x24315 0x2524b 0x16cf8 0x1beadf9 0x1beaad0 0x1c04bf5 0x1c04962 0x1c35bb6 0x1c34f44 0x1c34e1b 0x127da 0x1465c 0x251d 0x2445)
libc++abi.dylib: terminate called throwing an exception
(lldb).

If you please understand a word from this guide me. I'm really lost.

I feel it happened when I linked my UISwitch but I've tried disliking it, deleting it, commenting all the codes and still same thing! I'm a beginner but a fast learner so please elaborate and ask me if you need more details.

user1949873
  • 460
  • 7
  • 17
  • possible duplicate of [this class is not key value coding-compliant for the key](http://stackoverflow.com/questions/3088059/this-class-is-not-key-value-coding-compliant-for-the-key) – John Koerner Jan 14 '13 at 13:46
  • 1
    This usually means you haven't linked one of your xib views properly through the outlets. Check that. – Breakpoint Jan 14 '13 at 13:49
  • 1
    Hopefully you've been using version control and can look back to see what's changed, and/or roll back to an earlier, working version. Version control is critical to software development. – bames53 Jan 14 '13 at 14:03
  • @bames53 how do you do that? – user1949873 Jan 14 '13 at 21:06
  • See [here](http://developer.apple.com/library/ios/#documentation/ToolsLanguages/Conceptual/Xcode4UserGuide/085-Save_and_Revert_Changes_to_Projects/manage_project_changes.html) – bames53 Jan 14 '13 at 21:25

1 Answers1

2

Check in IB that you have connected all of your outlets. I often get this when I accidentally wind up with two connections to the same UI element, usually because IB doesn't undo very well.

ahwulf
  • 2,584
  • 15
  • 29
  • you were exactly right. I checked the outlets and found one their actions weren't connected. However, after I reconnected it the problem persist. So, I deleted the whole view and rebuilt it again and it worked. The problem seems to be when you connect an outlet, that's it! Never touch it again!!! I hope someone would teach me how to disconnect it properly. – user1949873 Jan 14 '13 at 20:15