I am a total newbie with objective C and IOS programming trying to follow along with a tutorial on the Apple Website.
I got to the point in the Apple tutorial where you add an unwind segue to the Add to-do page.
https://developer.apple.com/library/ios/referencelibrary/GettingStarted/RoadMapiOS/SecondTutorial.html#//apple_ref/doc/uid/TP40011343-CH8-SW1
I successfully added unwind segues to both the Cancel and Done buttons.
However, when I compiled the program, while it compiles, it no longer lets me click on + to get to the add to-do page.
When the simulator initially loads, it is fine. But when I click on +, Xcode appears in front of the simulator and in the debugger it says what is below.
Note I have no experience in debugging. What appears in editor is main.m and the following is in right side of debug section at bottom:
2014-12-03 13:28:54.854 single-nocore[20692:1523451] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UITableViewController loadView] loaded the "vXZ-lx-hvc-view-kh9-bI-dsS" nib but didn't get a UITableView.'
*** First throw call stack:
(
0 CoreFoundation 0x0000000102eabf35 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000101265bb7 objc_exception_throw + 45
2 CoreFoundation 0x0000000102eabe6d +[NSException raise:format:] + 205
3 UIKit 0x0000000101785415 -[UITableViewController loadView] + 249
4 UIKit 0x00000001015c87f9 -[UIViewController loadViewIfRequired] + 75
5 UIKit 0x00000001015c8c8e -[UIViewController view] + 27
6 UIKit 0x0000000101600d3b -[UINavigationController preferredContentSize] + 149
7 UIKit 0x00000001015a8ec2 -[UIPresentationController preferredContentSizeDidChangeForChildContentContainer:] + 101
8 UIKit 0x00000001015a6b0d __56-[UIPresentationController runTransitionForCurrentState]_block_invoke + 108
9 UIKit 0x00000001014c6331 _applyBlockToCFArrayCopiedToStack + 314
10 UIKit 0x00000001014c61ab _afterCACommitHandler + 516
11 CoreFoundation 0x0000000102de0dc7 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
12 CoreFoundation 0x0000000102de0d20 __CFRunLoopDoObservers + 368
13 CoreFoundation 0x0000000102dd6b53 __CFRunLoopRun + 1123
14 CoreFoundation 0x0000000102dd6486 CFRunLoopRunSpecific + 470
15 GraphicsServices 0x0000000104bae9f0 GSEventRunModal + 161
16 UIKit 0x00000001014a3420 UIApplicationMain + 1282
17 single-nocore 0x0000000100d39b23 main + 115
18 libdyld.dylib 0x0000000103b5c145 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
Thanks in advance for any suggestions.
Related
I follow "https://segment.com/" to implement analytics user usage on my iOS source. But when i use UIAlertController to show alert with title is #"", my app was crash! I don't know exactly why. To solve it, i must set title of alert is nil. And this is my logs:
2016-11-10 17:12:57.185 Lightning Rider Partner[24434:236155] *** Assertion failure in -[SEGAnalytics screen:properties:options:](), /Users/dungdo/Desktop/tcourier-ios/v2_driver/Pods/Analytics/Analytics/Classes/SEGAnalytics.m:323
2016-11-10 17:12:57.192 Lightning Rider Partner[24434:236155] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'screen name () must not be empty.'
*** First throw call stack:
(
0 CoreFoundation 0x000000010c1f134b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x00000001120f521e objc_exception_throw + 48
2 CoreFoundation 0x000000010c1f5442 +[NSException raise:format:arguments:] + 98
3 Foundation 0x0000000111cc1d79 -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 166
4 Analytics 0x000000010bc29d37 -[SEGAnalytics screen:properties:options:] + 471
5 Analytics 0x000000010bc3fb7c -[UIViewController(SEGScreen) seg_viewDidAppear:] + 444
6 UIKit 0x000000010e50eb0c -[UIViewController _setViewAppearState:isAnimating:] + 945
7 UIKit 0x000000010e51187a __64-[UIViewController viewDidMoveToWindow:shouldAppearOrDisappear:]_block_invoke + 42
8 UIKit 0x000000010e50fb64 -[UIViewController _executeAfterAppearanceBlock] + 86
9 UIKit 0x000000010e374438 _runAfterCACommitDeferredBlocks + 653
10 UIKit 0x000000010e360f6f _cleanUpAfterCAFlushAndRunDeferredBlocks + 566
11 UIKit 0x000000010e3923da _afterCACommitHandler + 176
12 CoreFoundation 0x000000010c195e17 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
13 CoreFoundation 0x000000010c195d87 __CFRunLoopDoObservers + 391
14 CoreFoundation 0x000000010c17ab9e __CFRunLoopRun + 1198
15 CoreFoundation 0x000000010c17a494 CFRunLoopRunSpecific + 420
16 GraphicsServices 0x0000000115145a6f GSEventRunModal + 161
17 UIKit 0x000000010e367964 UIApplicationMain + 159
18 Lightning Rider Partner 0x000000010ad74c3f main + 111
19 libdyld.dylib 0x00000001128a868d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
I was getting the same issue while using the Segment framework.
I just comment the Assert statement in SDK file for empty screen. Please search line below in your whole project and comment it out.
NSCAssert1(screenTitle.length > 0, #"screen name (%#) must not be empty.", screenTitle);
You are good to go.
This seems like the error Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'screen name () must not be empty.
Make sure you already set it while creating SEGAnalytics class or something related
The first view controller of my project crashed when segue'd to from another view controller - but not when it loads. I get this error message:
2016-01-05 20:06:33.836 collaboration[48812:1788623] -[collaboration.createAccountViewController loginExisting:]: unrecognized selector sent to instance 0x796cc950
2016-01-05 20:06:33.849 collaboration[48812:1788623] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[collaboration.createAccountViewController loginExisting:]: unrecognized selector sent to instance 0x796cc950'
*** First throw call stack:
(
0 CoreFoundation 0x00396a14 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x022c5e02 objc_exception_throw + 50
2 CoreFoundation 0x0039fd63 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
3 CoreFoundation 0x002dd6bd ___forwarding___ + 1037
4 CoreFoundation 0x002dd28e _CF_forwarding_prep_0 + 14
5 libobjc.A.dylib 0x022da0b5 -[NSObject performSelector:withObject:withObject:] + 84
6 UIKit 0x00df7b79 -[UIApplication sendAction:to:from:forEvent:] + 118
7 UIKit 0x00df7af8 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 64
8 UIKit 0x00f978f8 -[UIControl sendAction:to:forEvent:] + 79
9 UIKit 0x00f97c78 -[UIControl _sendActionsForEvents:withEvent:] + 408
10 UIKit 0x00f96c7e -[UIControl touchesEnded:withEvent:] + 714
11 UIKit 0x00e74182 -[UIWindow _sendTouchesForEvent:] + 1095
12 UIKit 0x00e75220 -[UIWindow sendEvent:] + 1159
13 UIKit 0x00e19f93 -[UIApplication sendEvent:] + 266
14 UIKit 0x00def668 _UIApplicationHandleEventQueue + 7802
15 CoreFoundation 0x002b06ff __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
16 CoreFoundation 0x002a638b __CFRunLoopDoSources0 + 523
17 CoreFoundation 0x002a57a8 __CFRunLoopRun + 1032
18 CoreFoundation 0x002a50e6 CFRunLoopRunSpecific + 470
19 CoreFoundation 0x002a4efb CFRunLoopRunInMode + 123
20 GraphicsServices 0x07075664 GSEventRunModal + 192
21 GraphicsServices 0x070754a1 GSEventRun + 104
22 UIKit 0x00df5bfa UIApplicationMain + 160
23 collaboration 0x00085a3c main + 140
24 libdyld.dylib 0x039bca21 start + 1
25 ??? 0x00000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
As you can see, it cites the variable 'loginExisting' as the issue, however loginExisting is not a variable on in any of my scripts (it was before but has since been removes). How can I 'refresh' XCode so that it forgets about the absent variable? I have tried restarting my machine and cleaning XCode but have had not success.
Thank you for your help.
Go to your storyboard that's crashing and right click the yellow icon at the top of the ViewController.
After right clicking, look towards the bottom where it says "Received actions" and delete all of the actions pertaining to the loginExisting method.
This is one of many possible culprits, but this tends to be the most common.
EDIT: It's also possible that you have a property (IBOutlet) connected to the storyboard that no longer exists which will throw an error.
downloaded here this parser launched, it works, but when I want to change main interface (the default setting is MainWindow.xib, and I want to put my xib), shows the following error. I wish that I was a structure MyNewXib.xib - MainWindow.xib - RootViewController.xib, but when I add in MainInterface MyNewXib.xib get this error, how do I fix it.
2015-03-23 11:27:02.686 TetraVer 1.1[411:5899] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIApplication 0x7fa352c30c10> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key view.'
*** First throw call stack:
(
0 CoreFoundation 0x0000000110e1ba75 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010fad9bb7 objc_exception_throw + 45
2 CoreFoundation 0x0000000110e1b6b9 -[NSException raise] + 9
3 Foundation 0x000000010f42fd43 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 259
4 CoreFoundation 0x0000000110d655e0 -[NSArray makeObjectsPerformSelector:] + 224
5 UIKit 0x000000010e3f54ed -[UINib instantiateWithOwner:options:] + 1506
6 UIKit 0x000000010e3f6f92 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 160
7 UIKit 0x000000010e12dc71 -[UIApplication _loadMainNibFileNamed:bundle:] + 46
8 UIKit 0x000000010e12cd2b -[UIApplication _runWithMainScene:transitionContext:completion:] + 1074
9 UIKit 0x000000010e12bd35 -[UIApplication workspaceDidEndTransaction:] + 179
10 FrontBoardServices 0x000000010fe84243 __31-[FBSSerialQueue performAsync:]_block_invoke + 16
11 CoreFoundation 0x0000000110d50c7c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
12 CoreFoundation 0x0000000110d469c5 __CFRunLoopDoBlocks + 341
13 CoreFoundation 0x0000000110d46785 __CFRunLoopRun + 2389
14 CoreFoundation 0x0000000110d45bc6 CFRunLoopRunSpecific + 470
15 UIKit 0x000000010e12b7a2 -[UIApplication _run] + 413
16 UIKit 0x000000010e12e580 UIApplicationMain + 1282
17 TetraVer 1.1 0x000000010e06c6f4 main + 68
18 libdyld.dylib 0x0000000114c7d145 start + 1
19 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Make sure you have the elements linked correctly with interface and definition (check the outlet for you xib elements). This error comes usually when you have one ore more element in xib witch definition (#property) was deleted.
Does anyone have any ideas, this is killing me. Create an app from a Single View Application template, delete the storyboard and ViewController.swift file and then add a new view controller called MainViewController with a Xib.
Change the project settings for Main Interface from Main to MainViewController and run.
In previous versions of Xcode this would have worked fine. Now no matter what I try I cannot get this to work. Tried initialising the View Controller in the App Delegate but no joy, it just crashes with this exception:
2014-11-22 11:14:48.084 TestApp[9781:422842] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIApplication 0x7fd510611320> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key view.'
*** First throw call stack:
(
0 CoreFoundation 0x00000001025c9f35 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010410dbb7 objc_exception_throw + 45
2 CoreFoundation 0x00000001025c9b79 -[NSException raise] + 9
3 Foundation 0x00000001029e17b3 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 259
4 CoreFoundation 0x0000000102513e80 -[NSArray makeObjectsPerformSelector:] + 224
5 UIKit 0x000000010311ac7d -[UINib instantiateWithOwner:options:] + 1506
6 UIKit 0x000000010311c722 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 160
7 UIKit 0x0000000102e54b11 -[UIApplication _loadMainNibFileNamed:bundle:] + 46
8 UIKit 0x0000000102e53c19 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1075
9 UIKit 0x0000000102e52bf2 -[UIApplication workspaceDidEndTransaction:] + 179
10 FrontBoardServices 0x0000000105cad2a3 __31-[FBSSerialQueue performAsync:]_block_invoke + 16
11 CoreFoundation 0x00000001024ff53c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
12 CoreFoundation 0x00000001024f5285 __CFRunLoopDoBlocks + 341
13 CoreFoundation 0x00000001024f5045 __CFRunLoopRun + 2389
14 CoreFoundation 0x00000001024f4486 CFRunLoopRunSpecific + 470
15 UIKit 0x0000000102e52669 -[UIApplication _run] + 413
16 UIKit 0x0000000102e55420 UIApplicationMain + 1282
17 TestApp 0x00000001023e9cae top_level_code + 78
18 TestApp 0x00000001023e9cea main + 42
19 libdyld.dylib 0x00000001048e7145 start + 1
20 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
You need to provide a xib or storyboard file for the Main Interface. Not a ViewController.
Also make sure you don't have any dangling outlets. Make sure that the objects in the xib don't have an outlet set which does not exist in your ViewController.h or ViewController.m
I am setting up parse and have some problems. I am using a storyboard to do this. However I am getting a error saying
2014-04-08 23:11:59.802 ParseStarterProject[5729:60b] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </Users/user/Library/Application Support/iPhone Simulator/7.1-64/Applications/CCA0F113-88E5-4181-A5A0-77841C12939E/ParseStarterProject.app> (loaded)' with name 'MainWindow''
*** First throw call stack:
(
0 CoreFoundation 0x0000000102d1f495 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010258a99e objc_exception_throw + 43
2 CoreFoundation 0x0000000102d1f2ad +[NSException raise:format:] + 205
3 UIKit 0x0000000101392742 -[UINib instantiateWithOwner:options:] + 775
4 UIKit 0x00000001013942a0 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 138
5 UIKit 0x000000010113760d -[UIApplication _loadMainNibFileNamed:bundle:] + 42
6 UIKit 0x000000010113693e -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 454
7 UIKit 0x0000000101147d4c -[UIApplication handleEvent:withNewEvent:] + 3189
8 UIKit 0x0000000101148216 -[UIApplication sendEvent:] + 79
9 UIKit 0x0000000101138086 _UIApplicationHandleEvent + 578
10 GraphicsServices 0x0000000102c4c71a _PurpleEventCallback + 762
11 GraphicsServices 0x0000000102c4c1e1 PurpleEventCallback + 35
12 CoreFoundation 0x0000000102ca1679 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41
13 CoreFoundation 0x0000000102ca144e __CFRunLoopDoSource1 + 478
14 CoreFoundation 0x0000000102cca903 __CFRunLoopRun + 1939
15 CoreFoundation 0x0000000102cc9d83 CFRunLoopRunSpecific + 467
16 UIKit 0x00000001011362e1 -[UIApplication _run] + 609
17 UIKit 0x0000000101137e33 UIApplicationMain + 1010
18 ParseStarterProject 0x0000000100002f83 main + 115
19 ParseStarterProject 0x0000000100001fd4 start + 52
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
Why am I getting this, and are there possible fixes?
Regarding the error message and the "MainWindow". I guess, you deleted a UIWindow from the storyboard, which is still referenced in you AppDelegate.
Could you validate this by checking, whether there is some Zombie-reference of a MainWindow-Class?
In case you added a Storyboard for being new main interface:
Please make sure, you also set this new Storyboard as new Main Interface in your Build target. Herefore, go to your xCode-Project file and select the build target. In the General tab set the "Main Interface" to match your new storyboard