I have really been struggling to fix this NSUnkownKeyException I am getting now upon creation of a cell in my UITableView. This is the line of code causing the error:
let cell = tableView.dequeueReusableCellWithIdentifier("eventCell", forIndexPath: indexPath) as! EventTableViewCell
ACTUAL ERROR:
2016-07-08 19:08:58.879 myApp[15078:1230258] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<myApp.EventTableViewCell 0x7fbed3811000> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key view.'
*** First throw call stack:
(
0 CoreFoundation 0x000000010c143d85 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010df1fdeb objc_exception_throw + 48
2 CoreFoundation 0x000000010c1439c9 -[NSException raise] + 9
3 Foundation 0x000000010c51519b -[NSObject(NSKeyValueCoding) setValue:forKey:] + 288
4 UIKit 0x000000010ca264b6 -[UIView(CALayerDelegate) setValue:forKey:] + 173
5 UIKit 0x000000010cd357fb -[UIRuntimeOutletConnection connect] + 109
6 CoreFoundation 0x000000010c07d890 -[NSArray makeObjectsPerformSelector:] + 224
7 UIKit 0x000000010cd341de -[UINib instantiateWithOwner:options:] + 1864
8 UIKit 0x000000010cab595f -[UITableView _dequeueReusableViewOfType:withIdentifier:] + 428
9 UIKit 0x000000010cab5e32 -[UITableView dequeueReusableCellWithIdentifier:forIndexPath:] + 71
10 myApp 0x000000010a81735a _TFC15firebaseTestApp16CEViewController9tableViewfTCSo11UITableView21cellForRowAtIndexPathCSo11NSIndexPath_CSo15UITableViewCell + 330
11 myApp 0x000000010a817ccf _TToFC15firebaseTestApp16CEViewController9tableViewfTCSo11UITableView21cellForRowAtIndexPathCSo11NSIndexPath_CSo15UITableViewCell + 79
12 UIKit 0x000000010cac94f4 -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 766
13 UIKit 0x000000010cac962c -[UITableView _createPreparedCellForGlobalRow:willDisplay:] + 74
14 UIKit 0x000000010ca9dd4f -[UITableView _updateVisibleCellsNow:isRecursive:] + 2996
15 UIKit 0x000000010cad2686 -[UITableView _performWithCachedTraitCollection:] + 92
16 UIKit 0x000000010cab9344 -[UITableView layoutSubviews] + 224
17 UIKit 0x000000010ca26980 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 703
18 QuartzCore 0x0000000111a60c00 -[CALayer layoutSublayers] + 146
19 QuartzCore 0x0000000111a5508e _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 366
20 QuartzCore 0x0000000111a54f0c _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
21 QuartzCore 0x0000000111a493c9 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 277
22 QuartzCore 0x0000000111a77086 _ZN2CA11Transaction6commitEv + 486
23 QuartzCore 0x0000000111a777f8 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 92
24 CoreFoundation 0x000000010c068c37 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
25 CoreFoundation 0x000000010c068ba7 __CFRunLoopDoObservers + 391
26 CoreFoundation 0x000000010c05e7fb __CFRunLoopRun + 1147
27 CoreFoundation 0x000000010c05e0f8 CFRunLoopRunSpecific + 488
28 GraphicsServices 0x000000010f218ad2 GSEventRunModal + 161
29 UIKit 0x000000010c96bf09 UIApplicationMain + 171
30 myApp 0x000000010a834bf2 main + 114
31 libdyld.dylib 0x000000010e9fa92d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
Things i checked:
TableView is initialized to the proper class
TableView is connected to UITableViewController
I have checked every outlet I could find to make sure there were not any misconnections or empty connections.
Thank you so much for help, all is appreciated!
dequeueReusableCellWithIdentifier is attempting to instantiate an EventTableViewCell from a .xib it sounds like that file contains an invalid binding which is attempting to set a view property (which does not exist) on the EventTableViewCell. Look at your xib in Xcode, you probably have warnings about invalid outlet bindings.
you should select tableview cell in nib/storyboard and check Outlets in utilities panel.If any broken outlet comes to cell Xcode will put bang mark to connection node.For finding xib/storyboard you should search in xcode with EventTableViewCell
Related
The UITableView works fine when I am trying to use it through Xcode6.4, but when I'm trying it through Xcode 7.1.1 it crashes. I guess it's because of the iOS versions. I am attaching the crash log. Kindly suggest what the best way to fix it is. I am quite sure that:
1) Datasource and Delegates are working fine.
2) Numberofrows and heightOfRow methods are also getting called, but it crashes before the cellForRowAtIndexPath gets called.
Here is the log:
2016-02-05 15:34:27.400 Autograph24[3720:87023] * Assertion failure
in -[UITableViewRowData _assertValidIndexPath:allowEmptySection:],
/BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3512.29.5/UITableViewRowData.m:2310
2016-02-05 15:34:27.506 Autograph24[3720:87023] * Terminating app
due to uncaught exception 'NSInternalInconsistencyException', reason:
'Invalid indexPath'
*** First throw call stack: ( 0 CoreFoundation 0x00000001075c9f45 exceptionPreprocess + 165 1 libobjc.A.dylib
0x0000000107956deb objc_exception_throw + 48 2 CoreFoundation
0x00000001075c9daa +[NSException raise:format:arguments:] + 106 3
Foundation 0x0000000106e9b5ee
-[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 198 4
UIKit 0x0000000108d11412
-[UITableViewRowData _assertValidIndexPath:allowEmptySection:] + 963 5 UIKit 0x0000000108d11465
-[UITableViewRowData ensureHeightsFaultedInForIndexPath:availHeight:edgeInset:scrollPosition:]
+ 55 6 UIKit 0x0000000108af50c6 -[UITableView _contentOffsetForScrollingToRowAtIndexPath:atScrollPosition:] + 2510 7 UIKit 0x0000000108af59b9
-[UITableView scrollToRowAtIndexPath:atScrollPosition:animated:] + 39 8 Autograph24 0x0000000106b1b2ad
-[DashboardVC scrollToToday] + 685 9 Autograph24 0x0000000106b20289 -[DashboardVC changeCalendarStyle] + 313 10
Autograph24 0x0000000106b20144 -[DashboardVC
resizeScreenForPortrait] + 788 11 Autograph24
0x0000000106b1f6a0 -[DashboardVC rotateScreen] + 176 12 Autograph24
0x0000000106b15e76 -[DashboardVC viewDidLoad] + 166 13 UIKit
0x0000000108b49cc4 -[UIViewController loadViewIfRequired] + 1198 14
UIKit 0x0000000108b4fc7b
-[UIViewController __viewWillAppear:] + 120 15 UIKit 0x0000000108b7fa37 -[UINavigationController _startCustomTransition:] +
1203 16 UIKit 0x0000000108b8fcdb
-[UINavigationController _startDeferredTransitionIfNeeded:] + 712 17 UIKit 0x0000000108b90cea
-[UINavigationController __viewWillLayoutSubviews] + 57 18 UIKit 0x0000000108d36c85 -[UILayoutContainerView layoutSubviews] + 248 19
UIKit 0x0000000108a6be40
-[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 710 20 QuartzCore 0x000000010736359a -[CALayer
layoutSublayers] + 146 21 QuartzCore
0x0000000107357e70 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE +
366 22 QuartzCore 0x0000000107357cee
_ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24 23 QuartzCore 0x000000010734c475
_ZN2CA7Context18commit_transactionEPNS_11TransactionE + 277 24 QuartzCore 0x0000000107379c0a
_ZN2CA11Transaction6commitEv + 486 25 QuartzCore 0x000000010737a37c
_ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 92 26 CoreFoundation 0x00000001074f5947
__CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION + 23 27 CoreFoundation 0x00000001074f58b7
__CFRunLoopDoObservers + 391 28 CoreFoundation 0x00000001074eb50b __CFRunLoopRun + 1147 29 CoreFoundation
0x00000001074eae08 CFRunLoopRunSpecific + 488 30 GraphicsServices
0x000000010b1b5ad2 GSEventRunModal + 161 31 UIKit
0x00000001089b730d UIApplicationMain + 171 32 Autograph24
0x0000000106b15d9f main + 111 33 libdyld.dylib
0x000000010aac192d start + 1 34 ???
0x0000000000000001 0x0 + 1 ) libc++abi.dylib: terminating with
uncaught exception of type NSException
You have an invalid indexpath. That means that either the section or the row or both is not right. If you have a table with 2 sections and 2 rows per section then indexpath 0-3 is invalid, because section 0 does not provide a row 3. Similarly, indexpath 2-1 would be invalid, because section 2 does not exist (only 0 and 1).
As for how to fix this, first double check if all required methods are called and your data is correctly initialised. Then sprinkle breakpoints around your class. Mainly where you use any kind of indexpath, and see where it tries to read from outside your data.
Learn to read crash logs. In most cases and certainly in this case, they contain all the relevant information:
2016-02-05 15:34:27.400 Autograph24[3720:87023] * Assertion failure in -[UITableViewRowData _assertValidIndexPath:allowEmptySection:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3512.29.5/UITableViewRowData.m:2310
2016-02-05 15:34:27.506 Autograph24[3720:87023] * Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid indexPath'
It clearly says: reason: 'Invalid indexPath'
So first hint: an invalid index path (which is a well known thing if you work with UITableViews) was involved.
Next follows the stack trace where the error ocurred. The first few stack locations are within Apple's code. Usually skip them. But occasionally, they contain interesting hints. Here a function assertValidIndexPath:allowEmptySection:. That again shows that the index path is the problem.
*** First throw call stack: (
0 CoreFoundation 0x00000001075c9f45 exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000107956deb objc_exception_throw + 48
2 CoreFoundation 0x00000001075c9daa +[NSException raise:format:arguments:] + 106
3 Foundation 0x0000000106e9b5ee -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 198
4 UIKit 0x0000000108d11412 -[UITableViewRowData _assertValidIndexPath:allowEmptySection:] + 963
5 UIKit 0x0000000108d11465 -[UITableViewRowData ensureHeightsFaultedInForIndexPath:availHeight:edgeInset:scrollPosition:] + 55
6 UIKit 0x0000000108af50c6 -[UITableView _contentOffsetForScrollingToRowAtIndexPath:atScrollPosition:] + 2510
7 UIKit 0x0000000108af59b9 -[UITableView scrollToRowAtIndexPath:atScrollPosition:animated:] + 39
Here your code follows. Look at the line above and below. It says that your function [DashboardVC scrollToToday] has called the function [UITableView scrollToRowAtIndexPath:atScrollPosition:animated:]. This is where the error was triggered in your code.
8 Autograph24 0x0000000106b1b2ad -[DashboardVC scrollToToday] + 685
9 Autograph24 0x0000000106b20289 -[DashboardVC changeCalendarStyle] + 313
10 Autograph24 0x0000000106b20144 -[DashboardVC resizeScreenForPortrait] + 788
11 Autograph24 0x0000000106b1f6a0 -[DashboardVC rotateScreen] + 176
12 Autograph24 0x0000000106b15e76 -[DashboardVC viewDidLoad] + 166
This is the next interesting location. Here Apple's UIKit called your [DashboardVC viewDidLoad]. So that gives a lot of context. It happend early during the construction of you view in the viewDidLoad phase.
13 UIKit 0x0000000108b49cc4 -[UIViewController loadViewIfRequired] + 1198
14 UIKit 0x0000000108b4fc7b -[UIViewController __viewWillAppear:] + 120
15 UIKit 0x0000000108b7fa37 -[UINavigationController _startCustomTransition:] + 1203
16 UIKit 0x0000000108b8fcdb -[UINavigationController _startDeferredTransitionIfNeeded:] + 712
17 UIKit 0x0000000108b90cea -[UINavigationController __viewWillLayoutSubviews] + 57
18 UIKit 0x0000000108d36c85 -[UILayoutContainerView layoutSubviews] + 248
19 UIKit 0x0000000108a6be40 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 710
20 QuartzCore 0x000000010736359a -[CALayer layoutSublayers] + 146
21 QuartzCore 0x0000000107357e70 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 366
22 QuartzCore 0x0000000107357cee _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
23 QuartzCore 0x000000010734c475 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 277
24 QuartzCore 0x0000000107379c0a _ZN2CA11Transaction6commitEv + 486
25 QuartzCore 0x000000010737a37c _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 92
26 CoreFoundation 0x00000001074f5947 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION + 23
27 CoreFoundation 0x00000001074f58b7 __CFRunLoopDoObservers + 391
28 CoreFoundation 0x00000001074eb50b __CFRunLoopRun + 1147
29 CoreFoundation 0x00000001074eae08 CFRunLoopRunSpecific + 488
30 GraphicsServices 0x000000010b1b5ad2 GSEventRunModal + 161
31 UIKit 0x00000001089b730d UIApplicationMain + 171
32 Autograph24 0x0000000106b15d9f main + 111
33 libdyld.dylib 0x000000010aac192d start + 1
34 ??? 0x0000000000000001 0x0 + 1 ) libc++abi.dylib:
terminating with uncaught exception of type NSException
Combining this information I would conclude that you call [UITableView scrollToRowAtIndexPath:atScrollPosition:animated:] from within [DashboardVC viewDidLoad], which is bound to fail with any index path because the UITableView is not properly constructed at this time of the view controller's lifecycle.
Earlier iOS versions were more lenient here; but later versions are rather restrictive about what you can do before the view controller is fully constructed.
You will need to move your [UITableView scrollToRowAtIndexPath:atScrollPosition:animated:] call to either viewWillAppear: or even viewDidAppear:.
I'm using CoreData for my app and it would not run. I have an entity called "Task" and that entity has a class called Task.swift
This is the error message I'm getting;
2015-12-07 17:13:24.669 ToDoList[8002:64192] CoreData: warning: Unable to load class named 'Task' for entity 'Task'. Class not found, using default NSManagedObject instead.
2015-12-07 17:13:24.677 ToDoList[8002:64192] *** Assertion failure in -[UITableView dequeueReusableCellWithIdentifier:forIndexPath:], /SourceCache/UIKit_Sim/UIKit-3347.44.2/UITableView.m:6245
2015-12-07 17:13:24.679 ToDoList[8002:64192] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'unable to dequeue a cell with identifier reuseIdentifier - must register a nib or a class for the identifier or connect a prototype cell in a storyboard'
*** First throw call stack:
(
0 CoreFoundation 0x000000010f7ebc65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000111356bb7 objc_exception_throw + 45
2 CoreFoundation 0x000000010f7ebaca +[NSException raise:format:arguments:] + 106
3 Foundation 0x000000010fc8898f -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 195
4 UIKit 0x000000011017e264 -[UITableView dequeueReusableCellWithIdentifier:forIndexPath:] + 153
5 ToDoList 0x000000010f1efd83 _TFC8ToDoList27TaskListTableViewController9tableViewfS0_FTCSo11UITableView21cellForRowAtIndexPathCSo11NSIndexPath_CSo15UITableViewCell + 147
6 ToDoList 0x000000010f1f029f _TToFC8ToDoList27TaskListTableViewController9tableViewfS0_FTCSo11UITableView21cellForRowAtIndexPathCSo11NSIndexPath_CSo15UITableViewCell + 79
7 UIKit 0x000000011018b9e8 -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 508
8 UIKit 0x000000011016a208 -[UITableView _updateVisibleCellsNow:isRecursive:] + 2853
9 UIKit 0x0000000110180869 -[UITableView layoutSubviews] + 210
10 UIKit 0x000000011010a9eb -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 536
11 QuartzCore 0x0000000113ed8ed2 -[CALayer layoutSublayers] + 146
12 QuartzCore 0x0000000113ecd6e6 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 380
13 QuartzCore 0x0000000113ecd556 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
14 QuartzCore 0x0000000113e3986e _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 242
15 QuartzCore 0x0000000113e3aa22 _ZN2CA11Transaction6commitEv + 462
16 UIKit 0x00000001100889ed -[UIApplication _reportMainSceneUpdateFinished:] + 44
17 UIKit 0x00000001100896b1 -[UIApplication _runWithMainScene:transitionContext:completion:] + 2648
18 UIKit 0x0000000110088095 -[UIApplication workspaceDidEndTransaction:] + 179
19 FrontBoardServices 0x0000000112e535e5 __31-[FBSSerialQueue performAsync:]_block_invoke_2 + 21
20 CoreFoundation 0x000000010f71f41c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
21 CoreFoundation 0x000000010f715165 __CFRunLoopDoBlocks + 341
22 CoreFoundation 0x000000010f714f25 __CFRunLoopRun + 2389
23 CoreFoundation 0x000000010f714366 CFRunLoopRunSpecific + 470
24 UIKit 0x0000000110087b02 -[UIApplication _run] + 413
25 UIKit 0x000000011008a8c0 UIApplicationMain + 1282
26 ToDoList 0x000000010f1ecb47 main + 135
27 libdyld.dylib 0x0000000111a8c145 start + 1
28 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
Class:
import Foundation
import CoreData
class Task: NSManagedObject {
#NSManaged var tDesc: String
#NSManaged var tImage: NSData
#NSManaged var tName: String
}
I have looked at other questions on this topic and they did not help much. I don't know what else to do. Can someone help please!
Thank You
The issue is with swift and package management. In the data model editor make sure the module is set correctly. If it is set to "none" then that is the source of your issue. Change it to be the current project.
This may be a simulator error (Sometimes if you change the name of the core data file, or if you move your code around, the simulator data gets confused).
Try going to the simulator and doing Simulator->Reset Content and Settings
This will restart the simulator wiped clean.
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
I was recently trying to create a hidden button called signupComplete, and suddenly now I get this error everytime I try to run the app. here is the error message I recieve in the console:
*** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<SignupViewController 0x10a3519f0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key signupComplete.'
Im not sure why I am getting this. I even went back and removed anything that had to do with the signupComplete button, but I still keep receiving this error.
*** First throw call stack: (
0 CoreFoundation 0x0000000102846495 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x00000001025a599e objc_exception_throw + 43
2 CoreFoundation 0x00000001028ca919 -[NSException raise] + 9
3 Foundation 0x0000000102186530 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 259
4 CoreFoundation 0x0000000102842400 -[NSArray makeObjectsPerformSelector:] + 224
5 UIKit 0x00000001013ad8a6 -[UINib instantiateWithOwner:options:] + 1131
6 UIKit 0x0000000101247b0c -[UIViewController _loadViewFromNibNamed:bundle:] + 245
7 UIKit 0x0000000101248149 -[UIViewController loadView] + 112
8 UIKit 0x00000001012483b7 -[UIViewController loadViewIfRequired] + 75
9 UIKit 0x0000000101248777 -[UIViewController view] + 29
10 UIKit 0x000000010125f2c5 -[UINavigationController _startCustomTransition:] + 628
11 UIKit 0x000000010126a6f5 -[UINavigationController _startDeferredTransitionIfNeeded:] + 401
12 UIKit 0x000000010126b238 -[UINavigationController __viewWillLayoutSubviews] + 43
13 UIKit 0x0000000101385895 -[UILayoutContainerView layoutSubviews] + 202
14 UIKit 0x00000001011b2993 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 354
15 QuartzCore 0x00000001004d5802 -[CALayer layoutSublayers] + 151
16 QuartzCore 0x00000001004ca369 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 363
17 QuartzCore 0x00000001004ca1ea _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
18 QuartzCore 0x000000010043dfb8 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 252
19 QuartzCore 0x000000010043f030 _ZN2CA11Transaction6commitEv + 394
20 UIKit 0x0000000101151024 _UIApplicationHandleEventQueue + 10914
21 CoreFoundation 0x00000001027d5d21 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
22 CoreFoundation 0x00000001027d55f2 __CFRunLoopDoSources0 + 242
23 CoreFoundation 0x00000001027f146f __CFRunLoopRun + 767
24 CoreFoundation 0x00000001027f0d83 CFRunLoopRunSpecific + 467
25 GraphicsServices 0x000000010459ef04 GSEventRunModal + 161
26 UIKit 0x0000000101152e33 UIApplicationMain + 1010
27 PickPiic 0x0000000100002853 main + 115
28 libdyld.dylib 0x00000001031855fd start + 1
29 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
I want to display static cells in a ContainerView but every time the app runs it crashes at start. I read somewhere your unable to use static cells in UITableView but said it should work in a Container View to UITableViewController. Thanks for any input.
2014-01-01 15:44:56.294 InterestingGame[24199:a0b] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<ViewController 0x8935970> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key second.'
*** First throw call stack:
(
0 CoreFoundation 0x0173d5e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x014c08b6 objc_exception_throw + 44
2 CoreFoundation 0x017cd6a1 -[NSException raise] + 17
3 Foundation 0x011819ee -[NSObject(NSKeyValueCoding) setValue:forUndefinedKey:] + 282
4 Foundation 0x010edcfb _NSSetUsingKeyValueSetter + 88
5 Foundation 0x010ed253 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 267
6 Foundation 0x0114f70a -[NSObject(NSKeyValueCoding) setValue:forKeyPath:] + 412
7 UIKit 0x004d0a15 -[UIRuntimeOutletConnection connect] + 106
8 libobjc.A.dylib 0x014d27d2 -[NSObject performSelector:] + 62
9 CoreFoundation 0x01738b6a -[NSArray makeObjectsPerformSelector:] + 314
10 UIKit 0x004cf56e -[UINib instantiateWithOwner:options:] + 1417
11 UIKit 0x00762a2f -[UIStoryboard instantiateViewControllerWithIdentifier:] + 220
12 UIKit 0x00762ba8 -[UIStoryboard instantiateInitialViewController] + 74
13 UIKit 0x0022e44c -[UIApplication _loadMainStoryboardFileNamed:bundle:] + 79
14 UIKit 0x0022e6e9 -[UIApplication _loadMainInterfaceFile] + 245
15 UIKit 0x0022d28f -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 543
16 UIKit 0x0024187c -[UIApplication handleEvent:withNewEvent:] + 3447
17 UIKit 0x00241de9 -[UIApplication sendEvent:] + 85
18 UIKit 0x0022f025 _UIApplicationHandleEvent + 736
19 GraphicsServices 0x036942f6 _PurpleEventCallback + 776
20 GraphicsServices 0x03693e01 PurpleEventCallback + 46
21 CoreFoundation 0x016b8d65 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
22 CoreFoundation 0x016b8a9b __CFRunLoopDoSource1 + 523
23 CoreFoundation 0x016e377c __CFRunLoopRun + 2156
24 CoreFoundation 0x016e2ac3 CFRunLoopRunSpecific + 467
25 CoreFoundation 0x016e28db CFRunLoopRunInMode + 123
26 UIKit 0x0022cadd -[UIApplication _run] + 840
27 UIKit 0x0022ed3b UIApplicationMain + 1225
28 InterestingGame 0x0000473d main + 141
29 libdyld.dylib 0x01d79725 start + 0
)
libc++abi.dylib: terminating with uncaught exception of type NSException
That exception is pointing to an outlet being hooked up in interface builder that may no longer have an underlying property.
You may have previously had a second property declared in code that was then hooked up in a xib/storyboard. You will then have removed this property or renamed it and not broken the connection in the xib/storyboard. You need to go to the connections panel in interface builder and remove the broken connection