Xcode 6 Unknown class in Interface Builder file - ios

The error comes when the button links to a view controller. I am desperate to fix this problem. I am also quite new to Xcode.
I have tried, but none of them worked:
Unknown class in Interface Builder file Xcode error
Xcode 6 Strange Bug: Unknown class in Interference Builder file
XCode Unknown class ***** in Interface Builder file
The error is:
2015-04-19 15:17:32.565 *****[*******] Unknown class ******* in Interface Builder file.
2015-04-19 15:17:32.671 *****[********] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIViewController 0x7aecbd00> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key ********.'
*** First throw call stack:
(
0 CoreFoundation 0x01ff7466 __exceptionPreprocess + 182
1 libobjc.A.dylib 0x01c80a97 objc_exception_throw + 44
2 CoreFoundation 0x01ff7081 -[NSException raise] + 17
3 Foundation 0x0190380e -[NSObject(NSKeyValueCoding) setValue:forUndefinedKey:] + 282
4 Foundation 0x0185f838 _NSSetUsingKeyValueSetter + 115
5 Foundation 0x0185f7bd -[NSObject(NSKeyValueCoding) setValue:forKey:] + 267
6 Foundation 0x018950a6 -[NSObject(NSKeyValueCoding) setValue:forKeyPath:] + 386
7 UIKit 0x0097e329 -[UIRuntimeOutletConnection connect] + 106
8 libobjc.A.dylib 0x01c96724 -[NSObject performSelector:] + 62
9 CoreFoundation 0x01f30dbc -[NSArray makeObjectsPerformSelector:] + 316
10 UIKit 0x0097cdea -[UINib instantiateWithOwner:options:] + 1775
11 UIKit 0x0079e2a4 -[UIViewController _loadViewFromNibNamed:bundle:] + 270
12 UIKit 0x0079ea3b -[UIViewController loadView] + 295
13 UIKit 0x0079ec6f -[UIViewController loadViewIfRequired] + 78
14 UIKit 0x0079f215 -[UIViewController view] + 35
15 UIKit 0x00e14ca7 -[_UIFullscreenPresentationController _setPresentedViewController:] + 75
16 UIKit 0x00774551 -[UIPresentationController initWithPresentedViewController:presentingViewController:] + 113
17 UIKit 0x007ac6e1 -[UIViewController _presentViewController:withAnimationController:completion:] + 2102
18 UIKit 0x007af252 __62-[UIViewController presentViewController:animated:completion:]_block_invoke + 345
19 UIKit 0x007af0a4 -[UIViewController presentViewController:animated:completion:] + 224
20 UIKit 0x007af56a -[UIViewController presentModalViewController:animated:] + 57
21 UIKit 0x00c786cd -[UIStoryboardModalSegue perform] + 271
22 UIKit 0x00c65d89 -[UIStoryboardSegueTemplate _perform:] + 217
23 UIKit 0x00c65e05 -[UIStoryboardSegueTemplate perform:] + 116
24 libobjc.A.dylib 0x01c967cd -[NSObject performSelector:withObject:withObject:] + 84
25 UIKit 0x00648340 -[UIApplication sendAction:to:from:forEvent:] + 99
26 UIKit 0x006482d2 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 64
27 UIKit 0x0077ca56 -[UIControl sendAction:to:forEvent:] + 69
28 UIKit 0x0077ce73 -[UIControl _sendActionsForEvents:withEvent:] + 598
29 UIKit 0x0077c0dd -[UIControl touchesEnded:withEvent:] + 660
30 UIKit 0x00698ffa -[UIWindow _sendTouchesForEvent:] + 874
31 UIKit 0x00699ad5 -[UIWindow sendEvent:] + 791
32 UIKit 0x0065ebb1 -[UIApplication sendEvent:] + 242
33 UIKit 0x0066ebf6 _UIApplicationHandleEventFromQueueEvent + 21066
34 UIKit 0x00642bc7 _UIApplicationHandleEventQueue + 2300
35 CoreFoundation 0x01f1a98f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
36 CoreFoundation 0x01f1049d __CFRunLoopDoSources0 + 253
37 CoreFoundation 0x01f0f9f8 __CFRunLoopRun + 952
38 CoreFoundation 0x01f0f37b CFRunLoopRunSpecific + 443
39 CoreFoundation 0x01f0f1ab CFRunLoopRunInMode + 123
40 GraphicsServices 0x039022c1 GSEventRunModal + 192
41 GraphicsServices 0x039020fe GSEventRun + 104
42 UIKit 0x006469b6 UIApplicationMain + 1526
43 Goals 0x0006d0bd main + 141
44 libdyld.dylib 0x0450bac9 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)

It is cause when you change the name of a IBOutlet property in your .h/.m which you've already connected up to File's Owner in the nib.
From your nib:
Select the object in IB and go to the 'Connections Inspector'.
Under 'Referencing Outlets' make sure that your object isn't still connected to the old property name... if it is, click the small 'x' to delete the reference and build again.

1.Unknown class in Interface Builder file Xcode error means one of your ViewController in the StoryBoard linked with the unknown Class. Just Check it carefully.
2.After reading your error report, reason: '[<UIViewController 0x7aecbd00> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key. But lacking of specific codes, I can just recommend you some 'solutions'.
I will write a storeData function as the example. And objectA is the instance variable of your DataObject Class.
func storeData() {
let defaults = NSUserDefaults.standardUserDefaults()
var data = NSKeyedArchiver.archivedDataWithRootObject(objectA)
defaults.setValue(data, forUndefinedKey: "DataBase") // The error occur in there
}
See that data, which is the compression of objectA. And the objectA was inherited from the Class which mentioned in this class is not key value coding-compliant for the key.
The forUndefinedKey is kind of mark or name which leads complier to find correct data.
Solution: I guess the error was occurred in the process of the I/O for data. So check your each I/O function and block to verify that if the un-compression of that parameter, data, inherited from the same Class.
PS: If you gonna use NSUserDefaults to store your data, you should understand NSKeyedArchiver and NSKeyedUnarchiver which like Zip to compress the data. The complier will Archive your data in the processing of storing data and Unarchive the data in the processing of reading the data.

Related

Xcode Thread 1: SIGABRT: Uncaught Exception 'NSUnknownKeyException'

I am new to coding and Xcode. The problem I am facing with is stated in the title. I hope anyone can help me out of it.
The error message will be pasted at below
2015-07-13 01:11:36.443 Main_Iphone 6[2570:94488] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<Main_Iphone_6.ViewController 0x7fccc8432560> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key Button.'
First throw call stack:
(
0 CoreFoundation 0x0000000100c02c65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010276dbb7 objc_exception_throw + 45
2 CoreFoundation 0x0000000100c028a9 -[NSException raise] + 9
3 Foundation 0x0000000101020b53 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 259
4 CoreFoundation 0x0000000100b4ad50 -[NSArray makeObjectsPerformSelector:] + 224
5 UIKit 0x00000001017794eb -[UINib instantiateWithOwner:options:] + 1506
6 UIKit 0x00000001015d16d8 -[UIViewController _loadViewFromNibNamed:bundle:] + 242
7 UIKit 0x00000001015d1cc8 -[UIViewController loadView] + 109
8 UIKit 0x00000001015d1f39 -[UIViewController loadViewIfRequired] + 75
9 UIKit 0x00000001015d23ce -[UIViewController view] + 27
10 UIKit 0x00000001014ed289 -[UIWindow addRootViewControllerViewIfPossible] + 58
11 UIKit 0x00000001014ed64f -[UIWindow _setHidden:forced:] + 247
12 UIKit 0x00000001014f9de1 -[UIWindow makeKeyAndVisible] + 42
13 UIKit 0x000000010149d417 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 2732
14 UIKit 0x00000001014a019e -[UIApplication _runWithMainScene:transitionContext:completion:] + 1349
15 UIKit 0x000000010149f095 -[UIApplication workspaceDidEndTransaction:] + 179
16 FrontBoardServices 0x000000010426a5e5 __31-[FBSSerialQueue performAsync:]_block_invoke_2 + 21
17 CoreFoundation 0x0000000100b3641c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
18 CoreFoundation 0x0000000100b2c165 __CFRunLoopDoBlocks + 341
19 CoreFoundation 0x0000000100b2bf25 __CFRunLoopRun + 2389
20 CoreFoundation 0x0000000100b2b366 CFRunLoopRunSpecific + 470
21 UIKit 0x000000010149eb02 -[UIApplication _run] + 413
22 UIKit 0x00000001014a18c0 UIApplicationMain + 1282
23 Main_Iphone 6 0x0000000100a101d7 main + 135
24 libdyld.dylib 0x0000000102ea3145 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
You've got an outlet called Button defined in a storyboard or xib file, but the thing you're connecting it to doesn't have a property of the same name. Either you've deleted an IBOutlet from code or you've not set the correct view controller class in the identity inspector in interface builder.
The most important information is this class is not key value coding-compliant for the key Button.
From the backtrace you can see, that after an UINib is instantiated
[UINib instantiateWithOwner:options:]
there is a method sent to all objects of an array
[NSArray makeObjectsPerformSelector:]
to set the value of a property Button
[NSObject(NSKeyValueCoding) setValue:forKey:]
This property must be synthesized or have explicit setter and getter to be key value coding-compliant.
Set an Exception Breakpoint to find the exact location of the crash and look into your model classes for a missing property Button

uncaught exception of type NSException (connections seem fine) - Wenderlich tutorial

I'm a beginner working through Ray Wenderlich's Swift tutorial, Part 2.
The final code for the lesson (and with which I'm receiving the error) is here: http://cdn5.raywenderlich.com/wp-content/uploads/2014/06/TipCalculator-Demo4.zip
When I build the app through Xcode 6.3.2 and run it on the iOS simulator (iPhone 6), I get the error message below (sorry for the poor formatting).
I did a search on both Google and StackOverflow, seems like people often run into similar errors but are able to fix it by going to the view controller, checking the Connections Inspector, and fixing any of the connections that are flagged (e.g., an object being connected to no longer exists).
Note: I don't have any flags in my Connections Inspector -- everything seems fine there, including the connection between resultsTextView and Text View object in the Storyboard (please see attached photo)
Please let me know how to solve this - thanks.
---------See Connection Inspector on far right - looks fine!-----------
http://i.imgur.com/X6eA05F.png
---------Error message---------
2015-06-05 17:07:39.866 TipCalculator[4848:128801] * Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key resultsTextView.'
* First throw call stack:
(
0 CoreFoundation 0x0000000100216c65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000101d81bb7 objc_exception_throw + 45
2 CoreFoundation 0x00000001002168a9 -[NSException raise] + 9
3 Foundation 0x0000000100634b53 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 259
4 CoreFoundation 0x000000010015ed50 -[NSArray makeObjectsPerformSelector:] + 224
5 UIKit 0x0000000100d8d52b -[UINib instantiateWithOwner:options:] + 1506
6 UIKit 0x0000000100be5718 -[UIViewController _loadViewFromNibNamed:bundle:] + 242
7 UIKit 0x0000000100be5d08 -[UIViewController loadView] + 109
8 UIKit 0x0000000100be5f79 -[UIViewController loadViewIfRequired] + 75
9 UIKit 0x0000000100c1601b -[UINavigationController _layoutViewController:] + 44
10 UIKit 0x0000000100c16565 -[UINavigationController _updateScrollViewFromViewController:toViewController:] + 216
11 UIKit 0x0000000100c16664 -[UINavigationController _startTransition:fromViewController:toViewController:] + 92
12 UIKit 0x0000000100c17448 -[UINavigationController _startDeferredTransitionIfNeeded:] + 523
13 UIKit 0x0000000100c17f0e -[UINavigationController __viewWillLayoutSubviews] + 43
14 UIKit 0x0000000100d62715 -[UILayoutContainerView layoutSubviews] + 202
15 UIKit 0x0000000100b35a2b -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 536
16 QuartzCore 0x0000000104916ec2 -[CALayer layoutSublayers] + 146
17 QuartzCore 0x000000010490b6d6 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 380
18 QuartzCore 0x000000010490b546 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
19 QuartzCore 0x0000000104877886 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 242
20 QuartzCore 0x0000000104878a3a _ZN2CA11Transaction6commitEv + 462
21 UIKit 0x0000000100ab3a2d -[UIApplication _reportMainSceneUpdateFinished:] + 44
22 UIKit 0x0000000100ab46f1 -[UIApplication _runWithMainScene:transitionContext:completion:] + 2648
23 UIKit 0x0000000100ab30d5 -[UIApplication workspaceDidEndTransaction:] + 179
24 FrontBoardServices 0x00000001038915e5 __31-[FBSSerialQueue performAsync:]_block_invoke_2 + 21
25 CoreFoundation 0x000000010014a41c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
26 CoreFoundation 0x0000000100140165 __CFRunLoopDoBlocks + 341
27 CoreFoundation 0x000000010013f947 __CFRunLoopRun + 887
28 CoreFoundation 0x000000010013f366 CFRunLoopRunSpecific + 470
29 UIKit 0x0000000100ab2b42 -[UIApplication _run] + 413
30 UIKit 0x0000000100ab5900 UIApplicationMain + 1282
31 TipCalculator 0x000000010002c177 main + 135
32 libdyld.dylib 0x00000001024d9145 start + 1
33 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
Make sure you follow those steps correctly:
Open Main.storyboard and select your View Controller in the Document
Outline. Open the Connections Inspector (6th tab), and you will see
all of the properties you created listed in the Outlets section.
021_ConnectionsInspector You’ll notice a small circle to the right of
resultsTextView. Control-drag from that button down to the text view
below the Calculate button, and release to connect your Swift property
to this view.
I believe you are missing the #IBOutlet that is create in this step

iOS Unknown exception thrown out of the blue [duplicate]

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?
(79 answers)
Closed 7 years ago.
I've began to program an iOS application, but I ran into a sudden problem. The program worked as intended, I had a single view application, with navigation bar with title Title. When I compiled it, it was okay, but then I decided to "retitle" the title bar to say Hello. And after that I've got an error without a slightest idea what for, cause it worked like a minute before this error and the only change was the title of the title bar.
here is the error
Terminating app due to uncaught exception 'NSUnknownKeyException', reason:
[<MapViewController 0xa964410> setValue:forUndefinedKey:]: this class is not key
value coding-compliant for the key titleText.'
*** First throw call stack:
(
0 CoreFoundation 0x027a51e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x025248e5 objc_exception_throw + 44
2 CoreFoundation 0x02834fe1 -[NSException raise] + 17
3 Foundation 0x021e4d9e -[NSObject(NSKeyValueCoding) setValue:forUndefinedKey:] + 282
4 Foundation 0x021511d7 _NSSetUsingKeyValueSetter + 88
5 Foundation 0x02150731 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 267
6 Foundation 0x021b2b0a -[NSObject(NSKeyValueCoding) setValue:forKeyPath:] + 412
7 UIKit 0x0149b1f4 -[UIRuntimeOutletConnection connect] + 106
8 libobjc.A.dylib 0x025367de -[NSObject performSelector:] + 62
9 CoreFoundation 0x027a076a -[NSArray makeObjectsPerformSelector:] + 314
10 UIKit 0x01499d4d -[UINib instantiateWithOwner:options:] + 1417
11 UIKit 0x013026f5 -[UIViewController _loadViewFromNibNamed:bundle:] + 280
12 UIKit 0x01302e9d -[UIViewController loadView] + 302
13 UIKit 0x013030d3 -[UIViewController loadViewIfRequired] + 78
14 UIKit 0x013035d9 -[UIViewController view] + 35
15 UIKit 0x01223267 -[UIWindow addRootViewControllerViewIfPossible] + 66
16 UIKit 0x012235ef -[UIWindow _setHidden:forced:] + 312
17 UIKit 0x0122386b -[UIWindow _orderFrontWithoutMakingKey] + 49
18 UIKit 0x0122e3c8 -[UIWindow makeKeyAndVisible] + 65
19 Anchor-It 0x00005a39 -[AppDelegate application:didFinishLaunchingWithOptions:] + 585
20 UIKit 0x011de14f -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 309
21 UIKit 0x011deaa1 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1810
22 UIKit 0x011e3667 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 824
23 UIKit 0x011f7f92 -[UIApplication handleEvent:withNewEvent:] + 3517
24 UIKit 0x011f8555 -[UIApplication sendEvent:] + 85
25 UIKit 0x011e5250 _UIApplicationHandleEvent + 683
26 GraphicsServices 0x0381df02 _PurpleEventCallback + 776
27 GraphicsServices 0x0381da0d PurpleEventCallback + 46
28 CoreFoundation 0x02720ca5 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
29 CoreFoundation 0x027209db __CFRunLoopDoSource1 + 523
30 CoreFoundation 0x0274b68c __CFRunLoopRun + 2156
31 CoreFoundation 0x0274a9d3 CFRunLoopRunSpecific + 467
32 CoreFoundation 0x0274a7eb CFRunLoopRunInMode + 123
33 UIKit 0x011e2d9c -[UIApplication _run] + 840
34 UIKit 0x011e4f9b UIApplicationMain + 1225
35 Anchor-It 0x00005dbd main + 141
36 libdyld.dylib 0x03f5e701 start + 1
37 ??? 0x00000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Look at this part of the stack trace:
3 Foundation 0x021e4d9e -[NSObject(NSKeyValueCoding) setValue:forUndefinedKey:] + 282
4 Foundation 0x021511d7 _NSSetUsingKeyValueSetter + 88
5 Foundation 0x02150731 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 267
6 Foundation 0x021b2b0a -[NSObject(NSKeyValueCoding) setValue:forKeyPath:] + 412
7 UIKit 0x0149b1f4 -[UIRuntimeOutletConnection connect] + 106
You've got a bad connection in your .xib or storyboard file. The view loading process is trying to connect something to some outlet that doesn't exist, resulting in an exception being thrown. Further information about exactly what connection is bad comes from the exception itself:
[<MapViewController 0xa964410> setValue:forUndefinedKey:]: this class is not key
value coding-compliant for the key titleText.'
So, you've got an instance of MapViewController, and UIRuntimeOutletConnection (part of the view loading system) is trying to set an outlet called titleText. MapViewController apparently doesn't have a titleText property. This could happen because you used to have such a property but deleted it, or because you changed the class of the view controller from something else (that had such a property) to MapViewController (which doesn't), etc.

App crashing on load terminating with uncaught exception of type NSException

I have been playing around with a project of mine tonight and now I can't get it to load up. Strange thing is I have got an older version of this and have even tried to copy all data across and still not loading.
Error I am getting in NSLog is as follows:
2014-04-01 01:24:53.513 Adult Game[47180:a0b] CUICatalog: Invalid asset name supplied: , or invalid scale factor: 2.000000
2014-04-01 01:24:53.515 Adult Game[47180:a0b] Could not load the "" image referenced from a nib in the bundle with identifier "DannyLinton.Adult-Game"
2014-04-01 01:24:53.519 Adult Game[47180:a0b] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<ViewController 0x8e35860> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key animate.'
*** First throw call stack:
(
0 CoreFoundation 0x0196f5e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x016f28b6 objc_exception_throw + 44
2 CoreFoundation 0x019ff6a1 -[NSException raise] + 17
3 Foundation 0x013b39ee -[NSObject(NSKeyValueCoding) setValue:forUndefinedKey:] + 282
4 Foundation 0x0131fcfb _NSSetUsingKeyValueSetter + 88
5 Foundation 0x0131f253 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 267
6 Foundation 0x0138170a -[NSObject(NSKeyValueCoding) setValue:forKeyPath:] + 412
7 UIKit 0x00702a15 -[UIRuntimeOutletConnection connect] + 106
8 libobjc.A.dylib 0x017047d2 -[NSObject performSelector:] + 62
9 CoreFoundation 0x0196ab6a -[NSArray makeObjectsPerformSelector:] + 314
10 UIKit 0x0070156e -[UINib instantiateWithOwner:options:] + 1417
11 UIKit 0x00573605 -[UIViewController _loadViewFromNibNamed:bundle:] + 280
12 UIKit 0x00573dad -[UIViewController loadView] + 302
13 UIKit 0x005740ae -[UIViewController loadViewIfRequired] + 78
14 UIKit 0x005745b4 -[UIViewController view] + 35
15 UIKit 0x0049c9fd -[UIWindow addRootViewControllerViewIfPossible] + 66
16 UIKit 0x0049cd97 -[UIWindow _setHidden:forced:] + 312
17 UIKit 0x0049d02d -[UIWindow _orderFrontWithoutMakingKey] + 49
18 UIKit 0x004a789a -[UIWindow makeKeyAndVisible] + 65
19 UIKit 0x0045acd0 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1851
20 UIKit 0x0045f3a8 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 824
21 UIKit 0x0047387c -[UIApplication handleEvent:withNewEvent:] + 3447
22 UIKit 0x00473de9 -[UIApplication sendEvent:] + 85
23 UIKit 0x00461025 _UIApplicationHandleEvent + 736
24 GraphicsServices 0x031042f6 _PurpleEventCallback + 776
25 GraphicsServices 0x03103e01 PurpleEventCallback + 46
26 CoreFoundation 0x018ead65 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
27 CoreFoundation 0x018eaa9b __CFRunLoopDoSource1 + 523
28 CoreFoundation 0x0191577c __CFRunLoopRun + 2156
29 CoreFoundation 0x01914ac3 CFRunLoopRunSpecific + 467
30 CoreFoundation 0x019148db CFRunLoopRunInMode + 123
31 UIKit 0x0045eadd -[UIApplication _run] + 840
32 UIKit 0x00460d3b UIApplicationMain + 1225
33 Adult Game 0x00007dad main + 141
34 libdyld.dylib 0x02df2725 start + 0
35 ??? 0x00000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
Any help would be very much appreciated.
You have a phantom connection in your StoryBoard or XIB file called "animate".
Open your StoryBoard / XIB file
If you are using a StoryBoard, select the AdultGame view controller
Click on the "File's Owner" along the left
Select "View > Utilities > Show Connections Inspector"
You will see a list of "Outlets". One of them will be called "animate" and have an exclamation point next to it. Click on the little "x" to delete it.

Cant find derived class on xcode inspector

I'm new to xcode and objective-c and i have created the base class which is a UIViewController. Let's call it A.
I have also created created an inheriting class B.
Now im trying to use my storyboard and connect it to the relevant B file,
But it wont show on the inspector, only the A file does.
Here are the header files:
A:
#import <UIKit/UIKit.h>
#import "Deck.h"
#interface CardGameViewController : UIViewController
// for subclasses
- (Deck*)createDeck; //abstract
#end
and:
B:
#import "CardGameViewController.h"
#interface PlayingCardViewController : CardGameViewController
#end
Is there any way to pass that? or should B actually be on the inspector?
EDIT:
This is the error i get after forcing the inspector to use the PlayingCardViewController:
2014-01-07 18:24:09.874 Matchismo[80975:70b] Unknown class PlayingCardGameViewController in Interface Builder file.
2014-01-07 18:24:09.893 Matchismo[80975:70b] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIViewController 0x8d841e0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key cardButtons.'
*** First throw call stack:
(
0 CoreFoundation 0x017415e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x014c48b6 objc_exception_throw + 44
2 CoreFoundation 0x017d16a1 -[NSException raise] + 17
3 Foundation 0x011859ee -[NSObject(NSKeyValueCoding) setValue:forUndefinedKey:] + 282
4 Foundation 0x010f1cfb _NSSetUsingKeyValueSetter + 88
5 Foundation 0x010f1253 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 267
6 Foundation 0x0115370a -[NSObject(NSKeyValueCoding) setValue:forKeyPath:] + 412
7 UIKit 0x0071fe3a -[UIRuntimeOutletCollectionConnection performConnect] + 690
8 UIKit 0x0071fe75 -[UIRuntimeOutletCollectionConnection connect] + 33
9 libobjc.A.dylib 0x014d67d2 -[NSObject performSelector:] + 62
10 CoreFoundation 0x0173cb6a -[NSArray makeObjectsPerformSelector:] + 314
11 UIKit 0x004d356e -[UINib instantiateWithOwner:options:] + 1417
12 UIKit 0x00345605 -[UIViewController _loadViewFromNibNamed:bundle:] + 280
13 UIKit 0x00345dad -[UIViewController loadView] + 302
14 UIKit 0x003460ae -[UIViewController loadViewIfRequired] + 78
15 UIKit 0x003465b4 -[UIViewController view] + 35
16 UIKit 0x0026e9fd -[UIWindow addRootViewControllerViewIfPossible] + 66
17 UIKit 0x0026ed97 -[UIWindow _setHidden:forced:] + 312
18 UIKit 0x0026f02d -[UIWindow _orderFrontWithoutMakingKey] + 49
19 UIKit 0x0027989a -[UIWindow makeKeyAndVisible] + 65
20 UIKit 0x0022ccd0 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1851
21 UIKit 0x002313a8 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 824
22 UIKit 0x0024587c -[UIApplication handleEvent:withNewEvent:] + 3447
23 UIKit 0x00245de9 -[UIApplication sendEvent:] + 85
24 UIKit 0x00233025 _UIApplicationHandleEvent + 736
25 GraphicsServices 0x036e82f6 _PurpleEventCallback + 776
26 GraphicsServices 0x036e7e01 PurpleEventCallback + 46
27 CoreFoundation 0x016bcd65 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
28 CoreFoundation 0x016bca9b __CFRunLoopDoSource1 + 523
29 CoreFoundation 0x016e777c __CFRunLoopRun + 2156
30 CoreFoundation 0x016e6ac3 CFRunLoopRunSpecific + 467
31 CoreFoundation 0x016e68db CFRunLoopRunInMode + 123
32 UIKit 0x00230add -[UIApplication _run] + 840
33 UIKit 0x00232d3b UIApplicationMain + 1225
34 Matchismo 0x000038dd main + 141
35 libdyld.dylib 0x01d7f70d start + 1
36 ??? 0x00000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
Go to the Product menu in Xcode and choose Clean. Sometimes that fixes weird issues like this.

Resources