With ObjectiveC I am developing a SingleView app targeting iOS 11 having one view controller/view. In the Main.storyboard on top of the view I've dropped a WebKit View (WKWebView).
I am seeing a crash in both the Simulator and on an iPhone 6 running iOS 11.0.1 :
Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named WKWebView'
Do I need anything else to have it working ? Looks like it's unable to instantiate WKWebView upon waking from storyboard.
Other details:
Xcode version 9.0 9A235
When I remove the WKWebView from the Storyboard the crash goes away
App Base SDK - latest iOS (iOS 11); Deployment target 11.0
Using the WebView(deprecated) -- UIWebView, it works
I did not attempt to instantiate it manually
Crash stack:
2017-11-06 18:38:27.765519+0200 XYZZMap[15689:1093338] *** Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named WKWebView'
*** First throw call stack:
(
0 CoreFoundation 0x00000001056d01cb __exceptionPreprocess + 171
1 libobjc.A.dylib 0x0000000105032f41 objc_exception_throw + 48
2 CoreFoundation 0x0000000105744b95 +[NSException raise:format:] + 197
3 UIKit 0x000000010692d2c0 UINibDecoderDecodeObjectForValue + 323
4 UIKit 0x000000010692d5db UINibDecoderDecodeObjectForValue + 1118
5 UIKit 0x000000010692d172 -[UINibDecoder decodeObjectForKey:] + 89
6 UIKit 0x00000001062f866b -[UIView initWithCoder:] + 969
7 UIKit 0x000000010692d43d UINibDecoderDecodeObjectForValue + 704
8 UIKit 0x000000010692d172 -[UINibDecoder decodeObjectForKey:] + 89
9 UIKit 0x00000001066dd1a7 -[UIRuntimeConnection initWithCoder:] + 178
10 UIKit 0x000000010692d43d UINibDecoderDecodeObjectForValue + 704
11 UIKit 0x000000010692d5db UINibDecoderDecodeObjectForValue + 1118
12 UIKit 0x000000010692d172 -[UINibDecoder decodeObjectForKey:] + 89
13 UIKit 0x00000001066dc3a4 -[UINib instantiateWithOwner:options:] + 1262
14 UIKit 0x00000001063f8d07 -[UIViewController _loadViewFromNibNamed:bundle:] + 383
15 UIKit 0x00000001063f9610 -[UIViewController loadView] + 177
16 UIKit 0x00000001063f9941 -[UIViewController loadViewIfRequired] + 195
17 UIKit 0x00000001063fa19e -[UIViewController view] + 27
18 UIKit 0x00000001062cdd17 -[UIWindow addRootViewControllerViewIfPossible] + 122
19 UIKit 0x00000001062ce41f -[UIWindow _setHidden:forced:] + 294
20 UIKit 0x00000001062e12bf -[UIWindow makeKeyAndVisible] + 42
21 UIKit 0x0000000106255015 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4711
22 UIKit 0x000000010625a245 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1720
23 UIKit 0x0000000106615c6c __111-[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:]_block_invoke + 924
24 UIKit 0x00000001069e33ef +[_UICanvas _enqueuePostSettingUpdateTransactionBlock:] + 153
25 UIKit 0x0000000106615865 -[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:] + 249
26 UIKit 0x00000001066160c3 -[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:] + 668
27 UIKit 0x0000000106f73c11 __82-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]_block_invoke + 262
28 UIKit 0x0000000106f73aca -[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:] + 444
29 UIKit 0x0000000106c61b9c __125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke + 420
30 UIKit 0x0000000106e5cc3e _performActionsWithDelayForTransitionContext + 100
31 UIKit 0x0000000106c61998 -[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:] + 231
32 UIKit 0x00000001069e2a4c -[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:] + 392
33 UIKit 0x0000000106258ac6 -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 523
34 UIKit 0x0000000106821523 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 369
35 FrontBoardServices 0x000000010b539158 -[FBSSceneImpl _didCreateWithTransitionContext:completion:] + 338
36 FrontBoardServices 0x000000010b541c4d __56-[FBSWorkspace client:handleCreateScene:withCompletion:]_block_invoke_2 + 235
37 libdispatch.dylib 0x00000001096b643c _dispatch_client_callout + 8
38 libdispatch.dylib 0x00000001096bbaf4 _dispatch_block_invoke_direct + 592
39 FrontBoardServices 0x000000010b56d672 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 24
40 FrontBoardServices 0x000000010b56d328 -[FBSSerialQueue _performNext] + 464
41 FrontBoardServices 0x000000010b56d897 -[FBSSerialQueue _performNextFromRunLoopSource] + 45
42 CoreFoundation 0x00000001056732b1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
43 CoreFoundation 0x0000000105712d31 __CFRunLoopDoSource0 + 81
44 CoreFoundation 0x0000000105657c19 __CFRunLoopDoSources0 + 185
45 CoreFoundation 0x00000001056571ff __CFRunLoopRun + 1279
46 CoreFoundation 0x0000000105656a89 CFRunLoopRunSpecific + 409
47 GraphicsServices 0x000000010be609c6 GSEventRunModal + 62
48 UIKit 0x000000010625bd30 UIApplicationMain + 159
49 XYZZMap 0x00000001047274bf main + 111
50 libdyld.dylib 0x0000000109732d81 start + 1
51 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Thanks!
NSInvalidUnarchiveOperationException when loading the nib / storyboard means there an object in the nib / storyboard that the runtime doesn't understand. This is because the framework that defines that kind of object is missing.
So, in this case, you need to link your app target against the WebKit framework so that the app understands what a WKWebView is when it is decoded from the storyboard.
Here's a screen shot showing the app target's Build Phases when this is correctly configured:
Select Target -> General -> Linked framework and libraries -> click on + symbol below -> search for webKit.Framwork -> add.
Update for swift 5.0 ++
And Xcode- 11.5 +
If you faced this issue which I mentioned below after linked WKWebView in storyboard.
NSInvalidUnarchiveOperationException', reason: 'Could not instantiate
class named WKWebView because no class named WKWebView was found; the
class needs to be defined in source code or linked in from a library
(ensure the class is part of the correct target)
Just follow this instruction to solve this in new Xcode.
Here's a screen shot showing the project target's Build Phases when this is correctly configured:
Check whether on the storyboard you have a WKWebView instance while in code you may have a UIWebView instance
Click on Project Target and then add webKit.Framwork as display below :
General -> Linked framework and libraries -> click on + symbol below -> search for webKit.Framwork -> add.
I too faced same kind of issue.
Without declaring WKWebView as Outlet
Got this error while running in simulator
After adding Outlet it worked fine for me.
Hope this helps :)
Related
I have been getting the below error and none of the existing Stack Overflow answers helped. I am poor at finding the exact location where error is formed by looking console results.
This is the error I get when I run in older devices (works fine in newer devices). What things can I try to determine the problem?
2019-12-30 16:52:04.784 Hospital[7075:164758] *** Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named _UIScrollViewLayoutGuide'
*** First throw call stack:
(
0 CoreFoundation 0x000000010ad9fb0b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x000000010a804141 objc_exception_throw + 48
2 CoreFoundation 0x000000010ae08625 +[NSException raise:format:] + 197
3 UIKit 0x000000010c15368d UINibDecoderDecodeObjectForValue + 323
4 UIKit 0x000000010c15353f -[UINibDecoder decodeObjectForKey:] + 89
5 Foundation 0x0000000109b0e417 -[NSLayoutConstraint initWithCoder:] + 757
6 UIKit 0x000000010c1537ff UINibDecoderDecodeObjectForValue + 693
7 UIKit 0x000000010c15399d UINibDecoderDecodeObjectForValue + 1107
8 UIKit 0x000000010c15353f -[UINibDecoder decodeObjectForKey:] + 89
9 UIKit 0x000000010bbee9de -[UIView initWithCoder:] + 2209
10 UIKit 0x000000010bc29687 -[UIScrollView initWithCoder:] + 71
11 UIKit 0x000000010c1537ff UINibDecoderDecodeObjectForValue + 693
12 UIKit 0x000000010c15399d UINibDecoderDecodeObjectForValue + 1107
13 UIKit 0x000000010c15353f -[UINibDecoder decodeObjectForKey:] + 89
14 UIKit 0x000000010bbee4ed -[UIView initWithCoder:] + 944
15 UIKit 0x000000010c1537ff UINibDecoderDecodeObjectForValue + 693
16 UIKit 0x000000010c15353f -[UINibDecoder decodeObjectForKey:] + 89
17 UIKit 0x000000010bf62f70 -[UIRuntimeConnection initWithCoder:] + 178
18 UIKit 0x000000010c1537ff UINibDecoderDecodeObjectForValue + 693
19 UIKit 0x000000010c15399d UINibDecoderDecodeObjectForValue + 1107
20 UIKit 0x000000010c15353f -[UINibDecoder a:] + 89
21 UIKit 0x000000010bf6216d -[UINib instantiateWithOwner:options:] + 1262
22 UIKit 0x000000010bcfcfc3 -[UIViewController _loadViewFromNibNamed:bundle:] + 381
23 UIKit 0x000000010bcfd8d9 -[UIViewController loadView] + 177
24 UIKit 0x000000010bcfdc0a -[UIViewController loadViewIfRequired] + 195
25 UIKit 0x000000010bcfe45a -[UIViewController view] + 27
26 Hospital 0x00000001086ecb00 $s15_Hospital15PagerScrollViewC03setcdE010toParentVC05pagesI0ySo16UIViewControllerC_SayAHGSgtF + 1152
27 Hospital 0x00000001086f6b85 $s15_Hospital22HomeMainViewControllerC11viewDidLoadyyF + 3861
28 Hospital 0x00000001086f6e9b $s15_Hospital22HomeMainViewControllerC11viewDidLoadyyFTo + 43
29 UIKit 0x000000010bcfe01a -[UIViewController loadViewIfRequired] + 1235
30 UIKit 0x000000010bd3ce6c -[UINavigationController _layoutViewController:] + 56
31 UIKit 0x000000010bd3d74a -[UINavigationController _updateScrollViewFromViewController:toViewController:] + 466
32 UIKit 0x000000010bd3d8bb -[UINavigationController _startTransition:fromViewController:toViewController:] + 127
33 UIKit 0x000000010bd3ea03 -[UINavigationController _startDeferredTransitionIfNeeded:] + 843
34 UIKit 0x000000010bd3fb41 -[UINavigationController __viewWillLayoutSubviews] + 58
35 UIKit 0x000000010bf3160c -[UILayoutContainerView layoutSubviews] + 231
36 UIKit 0x000000010bc1e55b -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1268
37 QuartzCore 0x000000010a572904 -[CALayer layoutSublayers] + 146
38 QuartzCore 0x000000010a566526 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 370
39 QuartzCore 0x000000010a5663a0 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
40 QuartzCore 0x000000010a4f5e92 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 294
41 QuartzCore 0x000000010a522130 _ZN2CA11Transaction6commitEv + 468
42 QuartzCore 0x000000010a522b37 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 115
43 CoreFoundation 0x000000010ad45717 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
44 CoreFoundation 0x000000010ad45687 __CFRunLoopDoObservers + 391
45 CoreFoundation 0x000000010ad2a038 CFRunLoopRunSpecific + 440
46 UIKit 0x000000010bb5508f -[UIApplication _run] + 468
47 UIKit 0x000000010bb5b134 UIApplicationMain + 159
48 Hospital 0x000000010872773b main + 75
49 libdyld.dylib 0x000000010e5d965d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
I had the same issue (using Xcode11 and running iOS 10.3.1).
Unchecking Content Layout Guides from the Scroll View worked for me.
image
Thanks to #Luke's answer I've found the exact reason of the problem: it is caused by constraints between any item and scroll view's Content Layout Guide.
So to find where the problem one needs to:
check the log to find out which view controller participates in the problem. According to the log shown by #Jaseel.Dev it is "Alexis_Hospital"
In that view controller in Interface Builder check all scroll views and their Content Layout Guides or Frame Layout Guides
There 2 ways to fix:
a) click on the scroll view, there Uncheck [ ] Content Layout Guides and check them again (Interface Builder will reassign the "layout guide" edges to "superview")
b) click on the Content Autolayout Guide and check if there any constraints pointing to them. Get rid of those constraints.
The main idea is to remove these constrains, which would crash on iOS 10 and earlier.
Please check following things in your source code:
Check if your Xib or Storyboard file has warnings with IBOutlet or
IBAction connection.
It looks like the error should be in your Xib or Storyboard since the error log backtraces shows error at UINibDecoder.
UILayoutGuide is available from iOS 9.0+, so check your app's deployment target which should be iOS 9 or above.
Also you have mentioned that you are seeing this issue only in older devices which may run with less than iOS 9.
Uncheck "Use Safe Area Layout Guides" option in the File Inspector in Xcode.
Finally check your previous working version of source code and compare the recent changes with error codebase to determine the reason for crash.
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 4 years ago.
as mentioned above, during one of the courses I am taking, when I run my project, the simulator opens the app, which appears to be blank.
I already reviewed many posts from people who had the same problem of mine and I tried unsuccessfully their solutions.
The solutions I reviewed are:
- Erase all content of the simulator
- Changed the type of simulator (from iPhone 8 plus to iPhone 7 plus)
- Making sure I had the right settings on the Info.plist
- Build different times the program from scratch as a new one.
And probably others I don't even remember.
I attach my files, as well as the page that opens right when my Simulator launches the application. ( the last screenshot )
Here is the error log
2018-06-18 22:52:29.685489+0200 Bullseye[2247:47563] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<Bullseye.ViewController 0x7fc0df70bf90> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key numValue.'
*** First throw call stack:
(
0 CoreFoundation 0x000000010625e1e6 __exceptionPreprocess + 294
1 libobjc.A.dylib 0x0000000102665031 objc_exception_throw + 48
2 CoreFoundation 0x000000010625e0b9 -[NSException raise] + 9
3 Foundation 0x0000000102086b47 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 292
4 UIKit 0x000000010309cec0 -[UIViewController setValue:forKey:] + 87
5 UIKit 0x000000010338ae8a -[UIRuntimeOutletConnection connect] + 109
6 CoreFoundation 0x0000000106200e8d -[NSArray makeObjectsPerformSelector:] + 317
7 UIKit 0x0000000103389834 -[UINib instantiateWithOwner:options:] + 1856
8 UIKit 0x00000001030a40d7 -[UIViewController _loadViewFromNibNamed:bundle:] + 383
9 UIKit 0x00000001030a4a04 -[UIViewController loadView] + 177
10 UIKit 0x00000001030a4d21 -[UIViewController loadViewIfRequired] + 175
11 UIKit 0x00000001030a5574 -[UIViewController view] + 27
12 UIKit 0x0000000102f73123 -[UIWindow addRootViewControllerViewIfPossible] + 122
13 UIKit 0x0000000102f73834 -[UIWindow _setHidden:forced:] + 294
14 UIKit 0x0000000102f865cc -[UIWindow makeKeyAndVisible] + 42
15 UIKit 0x0000000102efa3da -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4739
16 UIKit 0x0000000102eff5cb -[UIApplication _runWithMainScene:transitionContext:completion:] + 1677
17 UIKit 0x00000001032c1f7e __111-[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:]_block_invoke + 866
18 UIKit 0x0000000103694a39 +[_UICanvas _enqueuePostSettingUpdateTransactionBlock:] + 153
19 UIKit 0x00000001032c1bba -[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:] + 236
20 UIKit 0x00000001032c23db -[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:] + 675
21 UIKit 0x0000000103c33614 __82-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]_block_invoke + 299
22 UIKit 0x0000000103c334ae -[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:] + 433
23 UIKit 0x000000010391775d __125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke + 221
24 UIKit 0x0000000103b124b7 _performActionsWithDelayForTransitionContext + 100
25 UIKit 0x0000000103917627 -[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:] + 223
26 UIKit 0x00000001036940e0 -[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:] + 392
27 UIKit 0x0000000102efdeac -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 515
28 UIKit 0x00000001034d0bcb -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 361
29 FrontBoardServices 0x000000010828d2f3 -[FBSSceneImpl _didCreateWithTransitionContext:completion:] + 331
30 FrontBoardServices 0x0000000108295cfa __56-[FBSWorkspace client:handleCreateScene:withCompletion:]_block_invoke_2 + 225
31 libdispatch.dylib 0x00000001073c27ec _dispatch_client_callout + 8
32 libdispatch.dylib 0x00000001073c7db8 _dispatch_block_invoke_direct + 592
33 FrontBoardServices 0x00000001082c1470 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 24
34 FrontBoardServices 0x00000001082c112e -[FBSSerialQueue _performNext] + 439
35 FrontBoardServices 0x00000001082c168e -[FBSSerialQueue _performNextFromRunLoopSource] + 45
36 CoreFoundation 0x0000000106200bb1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
37 CoreFoundation 0x00000001061e54af __CFRunLoopDoSources0 + 271
38 CoreFoundation 0x00000001061e4a6f __CFRunLoopRun + 1263
39 CoreFoundation 0x00000001061e430b CFRunLoopRunSpecific + 635
40 GraphicsServices 0x0000000108b56a73 GSEventRunModal + 62
41 UIKit 0x0000000102f01057 UIApplicationMain + 159
42 Bullseye 0x0000000101d5bad7 main + 55
43 libdyld.dylib 0x000000010743f955 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
This might be because you have a bad connection in your outlets. Review them. If you have them changed in the view controller, you still need to update them in the storyboard.
the simulator is blank because your app is crashing. Check your storyboard outlet connections to make ensure they are all connected. Open the connections inspector and look out for any broken connections. If your connections are right the circles in your view controller should be filled (see image below)
I don't know why this isn't working my Firebase is configured.
Here is a Screenshot of my AppDelegate.swift file. Here is my console log:
2017-05-29 17:52:53.141 Study M8[31592] <Error> [Firebase/Core][I-COR000003] The default Firebase app has not yet been configured. Add [FIRApp configure] to your application initialization. Read more: https://firebase.google.com/docs/ios/setup#initialize_firebase_in_your_app.
2017-05-29 17:52:53.184 Study M8[31592:1051241] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'The default FIRApp instance must be configured before the default FIRAuthinstance can be initialized. One way to ensure that is to call `[FIRApp configure];` is called in `application:didFinishLaunchingWithOptions:`.'
*** First throw call stack:
(
0 CoreFoundation 0x000000010a445b0b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x0000000109eaa141 objc_exception_throw + 48
2 CoreFoundation 0x000000010a4ae625 +[NSException raise:format:] + 197
3 Study M8 0x0000000108550a84 +[FIRAuth auth] + 88
4 Study M8 0x00000001084e7a77 _TFC8Study_M810MessagesVCcfT5coderCSo7NSCoder_GSqS0__ + 279
5 Study M8 0x00000001084e7bcd _TToFC8Study_M810MessagesVCcfT5coderCSo7NSCoder_GSqS0__ + 45
6 UIKit 0x000000010ac70f54 -[UIClassSwapper initWithCoder:] + 246
7 UIKit 0x000000010ae614af UINibDecoderDecodeObjectForValue + 693
8 UIKit 0x000000010ae6164d UINibDecoderDecodeObjectForValue + 1107
9 UIKit 0x000000010ae611ef -[UINibDecoder decodeObjectForKey:] + 89
10 UIKit 0x000000010aa07267 -[UIViewController initWithCoder:] + 1421
11 UIKit 0x000000010aa5cee5 -[UITabBarController initWithCoder:] + 65
12 UIKit 0x000000010ae614af UINibDecoderDecodeObjectForValue + 693
13 UIKit 0x000000010ae611ef -[UINibDecoder decodeObjectForKey:] + 89
14 UIKit 0x000000010ac70c20 -[UIRuntimeConnection initWithCoder:] + 178
15 UIKit 0x000000010ae614af UINibDecoderDecodeObjectForValue + 693
16 UIKit 0x000000010ae6164d UINibDecoderDecodeObjectForValue + 1107
17 UIKit 0x000000010ae611ef -[UINibDecoder decodeObjectForKey:] + 89
18 UIKit 0x000000010ac6fe1d -[UINib instantiateWithOwner:options:] + 1262
19 UIKit 0x000000010b02882f -[UIStoryboard instantiateViewControllerWithIdentifier:] + 181
20 UIKit 0x000000010a8688d1 -[UIApplication _loadMainStoryboardFileNamed:bundle:] + 108
21 UIKit 0x000000010a868db3 -[UIApplication _loadMainInterfaceFile] + 260
22 UIKit 0x000000010a867456 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1407
23 UIKit 0x000000010a864793 -[UIApplication workspaceDidEndTransaction:] + 182
24 FrontBoardServices 0x000000010d3205f6 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 24
25 FrontBoardServices 0x000000010d32046d -[FBSSerialQueue _performNext] + 186
26 FrontBoardServices 0x000000010d3207f6 -[FBSSerialQueue _performNextFromRunLoopSource] + 45
27 CoreFoundation 0x000000010a3ebc01 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
28 CoreFoundation 0x000000010a3d10cf __CFRunLoopDoSources0 + 527
29 CoreFoundation 0x000000010a3d05ff __CFRunLoopRun + 911
30 CoreFoundation 0x000000010a3d0016 CFRunLoopRunSpecific + 406
31 UIKit 0x000000010a86302f -[UIApplication _run] + 468
32 UIKit 0x000000010a8690d4 UIApplicationMain + 159
33 Study M8 0x00000001084e8997 main + 55
34 libdyld.dylib 0x000000010ca5665d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
If anyone has any idea what to do plz help.
Does GoogleService-Info.plist show up as checked for the build target in the Xcode Target Membership pane?
There was a problem with the plist file, after replacing it everything worked fine. Thank you to everyone who helped.
Did you add the .plist Firebase configuration file that you get from the Firebase website when configuring your app?
The solution is already shown in the error message. Please visit the read and follow the link below. Your problem will be solved.
Add firebase to your iOS project
Maybe somebody can help, I'm trying to move my app to facilitate a new target for the Apple TV.
I create the new Storyboard and linked everything the same way as it has been in the iOS application. When I'm trying to start the application I get the following exception, after the AppDelegate is executed (before it goes into the viewDidLoad of the initial controller.
Any ideas?
2015-09-19 12:24:44.629 App TV[46733:3797033] *** Terminating app due to uncaught exception 'CALayerInvalid', reason: 'layer <CATransformLayer: 0x7fc1e0d51fc0> is a part of cycle in its layer tree'
*** First throw call stack:
(
0 CoreFoundation 0x000000010e850105 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010f271deb objc_exception_throw + 48
2 CoreFoundation 0x000000010e85003d +[NSException raise:format:] + 205
3 QuartzCore 0x0000000111d2f74a _ZN2CA5Layer30ensure_transaction_recursivelyEPNS_11TransactionE + 102
4 QuartzCore 0x0000000111d2f795 _ZN2CA5Layer30ensure_transaction_recursivelyEPNS_11TransactionE + 177
5 QuartzCore 0x0000000111d2f795 _ZN2CA5Layer30ensure_transaction_recursivelyEPNS_11TransactionE + 177
6 QuartzCore 0x0000000111d2f795 _ZN2CA5Layer30ensure_transaction_recursivelyEPNS_11TransactionE + 177
7 QuartzCore 0x0000000111d37439 _ZN2CA5Layer15insert_sublayerEPNS_11TransactionEP7CALayerm + 389
8 QuartzCore 0x0000000111d3782a -[CALayer addSublayer:] + 193
9 UIKit 0x000000010d2ce424 -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1512
10 UIKit 0x000000010d5b1b56 -[UIButton initWithCoder:] + 1424
11 UIKit 0x000000010d79dd62 UINibDecoderDecodeObjectForValue + 705
12 UIKit 0x000000010d79da98 -[UINibDecoder decodeObjectForKey:] + 278
13 UIKit 0x000000010d5d1315 -[UIRuntimeConnection initWithCoder:] + 134
14 UIKit 0x000000010d5d1a77 -[UIRuntimeEventConnection initWithCoder:] + 60
15 UIKit 0x000000010d79dd62 UINibDecoderDecodeObjectForValue + 705
16 UIKit 0x000000010d79df23 UINibDecoderDecodeObjectForValue + 1154
17 UIKit 0x000000010d79da98 -[UINibDecoder decodeObjectForKey:] + 278
18 UIKit 0x000000010d5d0555 -[UINib instantiateWithOwner:options:] + 1255
19 UIKit 0x000000010d3ad7f2 -[UIViewController _loadViewFromNibNamed:bundle:] + 381
20 UIKit 0x000000010d3ae11e -[UIViewController loadView] + 178
21 UIKit 0x000000010d3ae47d -[UIViewController loadViewIfRequired] + 139
22 UIKit 0x000000010d3aec7e -[UIViewController view] + 27
23 UIKit 0x000000010d289484 -[UIWindow addRootViewControllerViewIfPossible] + 61
24 UIKit 0x000000010d289b81 -[UIWindow _setHidden:forced:] + 302
25 UIKit 0x000000010d29b558 -[UIWindow makeKeyAndVisible] + 43
26 UIKit 0x000000010d216063 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4131
27 UIKit 0x000000010d21c5a8 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1755
28 UIKit 0x000000010d219783 -[UIApplication workspaceDidEndTransaction:] + 188
29 FrontBoardServices 0x000000011097b7ac -[FBSSerialQueue _performNext] + 192
30 FrontBoardServices 0x000000011097bb1a -[FBSSerialQueue _performNextFromRunLoopSource] + 45
31 CoreFoundation 0x000000010e77c1b1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
32 CoreFoundation 0x000000010e7720dc __CFRunLoopDoSources0 + 556
33 CoreFoundation 0x000000010e771593 __CFRunLoopRun + 867
34 CoreFoundation 0x000000010e770fa8 CFRunLoopRunSpecific + 488
35 UIKit 0x000000010d2190d5 -[UIApplication _run] + 402
36 UIKit 0x000000010d21de09 UIApplicationMain + 171
37 App TV 0x000000010d0b8fdd main + 109
38 libdyld.dylib 0x00000001149699e9 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Funny thing happening, apparently the new Apple TV (4th Gen / tvOS v9.0) can't handle 'Word Wrap' on a button, after setting it to 'Truncate Middle' it starts up fine. Maybe an issue in the beta.
On Xcode 7.2 I had this same error caused by setting the Line Break on a button to 'Character Wrap'. Changing to 'Truncate Middle' stopped the crash.
You can be notified where the exception occurs by activating Exception Breakpoints, then you will be able to see what happens.
You can do so by going on the Breakpoint navigator on Xcode, then on the Plus button at the bottom left.
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