xcode: class is not key value coding-compliant [duplicate] - ios

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 5 years ago.
I'm currently working myself through this tutorial:
https://developer.apple.com/library/content/referencelibrary/GettingStarted/DevelopiOSAppsSwift/ConnectTheUIToCode.html#//apple_ref/doc/uid/TP40015214-CH22-SW1
After creating the function for the button(at ~2/3 on the page) I tried running the code and got the Exception:
2017-12-08 11:24:31.343183+0100 FoodTracker[2159:154603] ***
Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<FoodTracker.ViewController 0x7fea6f406820> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key setDefaultLabelText.'
*** First throw call stack:
(
0 CoreFoundation 0x0000000109d7512b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x00000001060fcf41 objc_exception_throw + 48
2 CoreFoundation 0x0000000109d75079 -[NSException raise] + 9
3 Foundation 0x0000000105b1ba63 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 292
4 UIKit 0x0000000106b39117 -[UIViewController setValue:forKey:] + 87
5 UIKit 0x0000000106e2ac2d -[UIRuntimeOutletConnection connect] + 109
6 CoreFoundation 0x0000000109d183cd -[NSArray makeObjectsPerformSelector:] + 317
7 UIKit 0x0000000106e295e3 -[UINib instantiateWithOwner:options:] + 1856
8 UIKit 0x0000000106b403ff -[UIViewController _loadViewFromNibNamed:bundle:] + 383
9 UIKit 0x0000000106b40d2b -[UIViewController loadView] + 177
10 UIKit 0x0000000106b4105c -[UIViewController loadViewIfRequired] + 195
11 UIKit 0x0000000106b418b9 -[UIViewController view] + 27
12 UIKit 0x0000000106a0c7cf -[UIWindow addRootViewControllerViewIfPossible] + 122
13 UIKit 0x0000000106a0ced7 -[UIWindow _setHidden:forced:] + 294
14 UIKit 0x0000000106a1fe54 -[UIWindow makeKeyAndVisible] + 42
15 UIKit 0x00000001069928b8 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4737
16 UIKit 0x0000000106997aeb -[UIApplication _runWithMainScene:transitionContext:completion:] + 1720
17 UIKit 0x0000000106d616f8 __111-[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:]_block_invoke + 924
18 UIKit 0x00000001071374c8 +[_UICanvas _enqueuePostSettingUpdateTransactionBlock:] + 153
19 UIKit 0x0000000106d612f1 -[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:] + 249
20 UIKit 0x0000000106d61b6b -[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:] + 696
21 UIKit 0x00000001076dfa69 __82-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]_block_invoke + 262
22 UIKit 0x00000001076df922 -[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:] + 444
23 UIKit 0x00000001073bc9c8 __125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke + 221
24 UIKit 0x00000001075bbb06 _performActionsWithDelayForTransitionContext + 100
25 UIKit 0x00000001073bc88b -[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:] + 231
26 UIKit 0x0000000107136b25 -[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:] + 392
27 UIKit 0x000000010699636a -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 523
28 UIKit 0x0000000106f71605 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 369
29 FrontBoardServices 0x000000010bc38cc0 -[FBSSceneImpl _didCreateWithTransitionContext:completion:] + 338
30 FrontBoardServices 0x000000010bc417b5 __56-[FBSWorkspace client:handleCreateScene:withCompletion:]_block_invoke_2 + 235
31 libdispatch.dylib 0x000000010ae9733d _dispatch_client_callout + 8
32 libdispatch.dylib 0x000000010ae9c9f3 _dispatch_block_invoke_direct + 592
33 FrontBoardServices 0x000000010bc6d498 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 24
34 FrontBoardServices 0x000000010bc6d14e -[FBSSerialQueue _performNext] + 464
35 FrontBoardServices 0x000000010bc6d6bd -[FBSSerialQueue _performNextFromRunLoopSource] + 45
36 CoreFoundation 0x0000000109d18101 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
37 CoreFoundation 0x0000000109db7f71 __CFRunLoopDoSource0 + 81
38 CoreFoundation 0x0000000109cfca19 __CFRunLoopDoSources0 + 185
39 CoreFoundation 0x0000000109cfbfff __CFRunLoopRun + 1279
40 CoreFoundation 0x0000000109cfb889 CFRunLoopRunSpecific + 409
41 GraphicsServices 0x000000010c5019c6 GSEventRunModal + 62
42 UIKit 0x00000001069995d6 UIApplicationMain + 159
43 FoodTracker 0x00000001057e7b67 main + 55
44 libdyld.dylib 0x000000010af13d81 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
Here is my Code:
And the connections inspector of the button:

This is due to FoodTracker VC in storyboard has an outlet created but not connected.
How to resolve the issue? Follow these steps.
Open your storyboard, click on view controller below view controller scene.
Check for all outlets for ViewController.
Remove those outlets created and are not connected to ViewController.swift implementation file.
Keep me updated on the same.

Check your connection to #IBAction with this steps below:
In the storyboard:
In your view controller:
Updated:
In your case, you should remove connection in Reference Outlets because you connect it to the label outlet.

Related

xcode iOS App Crashes after the renaming of view controller

Outlets Crash at Entry Crash Image Screenshot
I am getting an crash after I renamed my View Controller . Swift file to CalculatorViewController.swift
I also tried refactoring new class name to be mirrored across all ports of entry to the app. I am getting Abort Signal Error. Please do help with this one! This is my error
UPDATE: ERROR IN queue com.apple.mainthread (serial) Thread 1
Crash point in code
class AppDelegate: UIResponder, UIApplicationDelegate {
UPDATE.
2019-03-11 15:36:01.990755+0530 NDv2[4619:144763] Unknown class
CalculatorViewController in Interface Builder file. 2019-03-11
15:36:02.040903+0530 NDv2[4619:144763] * Terminating app due to
uncaught exception 'NSUnknownKeyException', reason:
'[ setValue:forUndefinedKey:]: this
class is not key value coding-compliant for the key TextOutput.'
* First throw call stack: ( 0 CoreFoundation 0x000000010ef3e1bb exceptionPreprocess + 331 1 libobjc.A.dylib
0x000000010cf58735 objc_exception_throw + 48 2 CoreFoundation
0x000000010ef3dd29 -[NSException raise] + 9 3 Foundation
0x000000010c983de4 -[NSObject(NSKeyValueCoding) setValue:forKey:] +
292 4 UIKitCore 0x00000001113a3292
-[UIViewController setValue:forKey:] + 87 5 UIKitCore 0x000000011163a573 -[UIRuntimeOutletConnection connect] + 109 6
CoreFoundation 0x000000010ef29cfd -[NSArray
makeObjectsPerformSelector:] + 317 7 UIKitCore
0x00000001116372b9 -[UINib instantiateWithOwner:options:] + 1814 8
UIKitCore 0x00000001113aa452
-[UIViewController _loadViewFromNibNamed:bundle:] + 383 9 UIKitCore 0x00000001113aaddc -[UIViewController loadView] + 177 10 UIKitCore
0x00000001113ab0ee -[UIViewController loadViewIfRequired] + 175 11
UIKitCore 0x00000001113ab940
-[UIViewController view] + 27 12 UIKitCore 0x0000000111a02c53 -[UIWindow addRootViewControllerViewIfPossible] +
122 13 UIKitCore 0x0000000111a0336e
-[UIWindow _setHidden:forced:] + 294 14 UIKitCore 0x0000000111a165c0 -[UIWindow makeKeyAndVisible] + 42 15 UIKitCore
0x00000001119c3833 -[UIApplication
_callInitializationDelegatesForMainScene:transitionContext:] + 4595 16 UIKitCore 0x00000001119c8c2f
-[UIApplication _runWithMainScene:transitionContext:completion:] + 1623 17 UIKitCore 0x00000001111e74e9
__111-[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:]_block_invoke
+ 866 18 UIKitCore 0x00000001111f029c +[_UICanvas _enqueuePostSettingUpdateTransactionBlock:] + 153 19 UIKitCore 0x00000001111e7126
-[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:] + 233 20 UIKitCore 0x00000001111e7ae0
-[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:] + 1085 21 UIKitCore
0x00000001111e5cb5 __82-[_UIApplicationCanvas
_transitionLifecycleStateWithTransitionContext:completion:]_block_invoke
+ 795 22 UIKitCore 0x00000001111e595f -[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:] + 435 23 UIKitCore 0x00000001111eaa90
__125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke
+ 584 24 UIKitCore 0x00000001111eb80e _performActionsWithDelayForTransitionContext + 100 25 UIKitCore 0x00000001111ea7ef -[_UICanvasLifecycleSettingsDiffAction
performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]
+ 221 26 UIKitCore 0x00000001111ef93a -[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:] + 392 27 UIKitCore 0x00000001119c744e
-[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 515 28
UIKitCore 0x000000011156bd09
-[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 357 29
FrontBoardServices 0x000000011a0fc2da -[FBSSceneImpl
_didCreateWithTransitionContext:completion:] + 448 30 FrontBoardServices 0x000000011a107443
__56-[FBSWorkspace client:handleCreateScene:withCompletion:]_block_invoke_2 + 271 31
FrontBoardServices 0x000000011a106b3a
__40-[FBSWorkspace _performDelegateCallOut:]_block_invoke + 53 32 libdispatch.dylib 0x000000011047e602
_dispatch_client_callout + 8 33 libdispatch.dylib 0x0000000110481b78 _dispatch_block_invoke_direct + 301 34
FrontBoardServices 0x000000011a13bba8
__FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK + 30 35 FrontBoardServices 0x000000011a13b860
-[FBSSerialQueue _performNext] + 457 36 FrontBoardServices 0x000000011a13be40 -[FBSSerialQueue _performNextFromRunLoopSource] +
45 37 CoreFoundation 0x000000010eea3721
CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17 38 CoreFoundation 0x000000010eea2f93
__CFRunLoopDoSources0 + 243 39 CoreFoundation 0x000000010ee9d63f __CFRunLoopRun + 1263 40 CoreFoundation
0x000000010ee9ce11 CFRunLoopRunSpecific + 625 41 GraphicsServices
0x000000011713b1dd GSEventRunModal + 62 42 UIKitCore
0x00000001119ca81d UIApplicationMain + 140 43 NDv2
0x000000010c6291c7 main + 71 44 libdyld.dylib
0x00000001104f4575 start + 1 ) libc++abi.dylib: terminating with
uncaught exception of type NSException
There is two ways to change the name of ViewController:
1)
Ex.: class LoginViewController: UIViewController - just select the "LoginViewController", then right click -> Refactor -> Rename
This will change the name file name, class name and take care of the storyboard class name.
2) If you not able to use Method 1, then manually rename the file Name(.swift), then you have to go to the storyboard and replace the class name of the view controller. You may have issues with the outlets.
3) After that close the Xcode and then again start your project.
You have a textField or textView Or UILabel in your controller in storyboard,
1- Open your Storyboard
2- click the UIViewController(ViewController with new name of class you have changed)
3- remove outlet with name TextOutput
4- ReConnet if you want and you are ready to go
The error you are getting is because you had an IBOutlet on your storyboard that doesn't exist any more on the class where it was defined, this can be because you manually changed the name of a property on your class or deleted it.
On your storyboard, select the initial view controller and check if there is a reference to an IBOutlet named TextOutput. Delete that reference and link the View again. That should fix it
I solved it by setting the 'module' for 'Custom class' in Identity inspector

Simulator of Xcode Projects is blank [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 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)

Error with firebase Auth when starting ):

objc[4129]: Class PLBuildVersion is implemented in both /Applications/ Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/AssetsLibraryServices.framework/AssetsLibraryServices (0x11d1ec998) and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/PhotoLibraryServices.framework/PhotoLibraryServices (0x11d00e880). One of the two will be used. Which one is undefined.
2017-01-31 20:28:24.620 Reminder[4129:144700] WARNING: Firebase Analytics App Delegate Proxy is disabled. To log deep link campaigns manually, call the methods in FIRAnalytics+AppDelegate.h.
2017-01-31 20:28:24.917 Reminder[4129:144700] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<Reminder.LoginViewController 0x7fbeabd0a6f0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key Password.'
*** First throw call stack:
(
0 CoreFoundation 0x000000010c196d4b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x000000010bbf821e objc_exception_throw + 48
2 CoreFoundation 0x000000010c196c99 -[NSException raise] + 9
3 Foundation 0x000000010b7069df -[NSObject(NSKeyValueCoding) setValue:forKey:] + 291
4 UIKit 0x000000010c755293 -[UIViewController setValue:forKey:] + 88
5 UIKit 0x000000010c9c979e -[UIRuntimeOutletConnection connect] + 109
6 CoreFoundation 0x000000010c13b9e0 -[NSArray makeObjectsPerformSelector:] + 256
7 UIKit 0x000000010c9c8122 -[UINib instantiateWithOwner:options:] + 1867
8 UIKit 0x000000010c75b9c5 -[UIViewController _loadViewFromNibNamed:bundle:] + 386
9 UIKit 0x000000010c75c2e7 -[UIViewController loadView] + 177
10 UIKit 0x000000010c75c61c -[UIViewController loadViewIfRequired] + 201
11 UIKit 0x000000010c75ce70 -[UIViewController view] + 27
12 UIKit 0x000000010c6264b5 -[UIWindow addRootViewControllerViewIfPossible] + 71
13 UIKit 0x000000010c626c06 -[UIWindow _setHidden:forced:] + 293
14 UIKit 0x000000010c63a519 -[UIWindow makeKeyAndVisible] + 42
15 UIKit 0x000000010c5b2f8d -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4818
16 UIKit 0x000000010c5b90ed -[UIApplication _runWithMainScene:transitionContext:completion:] + 1731
17 UIKit 0x000000010c5b626d -[UIApplication workspaceDidEndTransaction:] + 188
18 FrontBoardServices 0x0000000111bbc6cb __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 24
19 FrontBoardServices 0x0000000111bbc544 -[FBSSerialQueue _performNext] + 189
20 FrontBoardServices 0x0000000111bbc8cd -[FBSSerialQueue _performNextFromRunLoopSource] + 45
21 CoreFoundation 0x000000010c13b761 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
22 CoreFoundation 0x000000010c12098c __CFRunLoopDoSources0 + 556
23 CoreFoundation 0x000000010c11fe76 __CFRunLoopRun + 918
24 CoreFoundation 0x000000010c11f884 CFRunLoopRunSpecific + 420
25 UIKit 0x000000010c5b4aea -[UIApplication _run] + 434
26 UIKit 0x000000010c5bac68 UIApplicationMain + 159
27 Reminder 0x000000010a4a94bf main + 111
28 libdyld.dylib 0x000000010e86868d start + 1
29 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
Get this when starting the app when I goto a view with firebase auth enabled.
The Worst thing is even when I remove the firebase auth and just have blank view it won't work
Forgot to add the FIRApp.configure() into the App delegate

Terminating app due to uncaught exception 'NSInternalInconsistencyException' with name 'OverlayView'

I intend to use a custom view Koloda in my newly-created swift xcode project via Podfile. After pod install, creating KolodaView in Main.storyboard and building successfully, it complains exception when running as follows:
2016-08-20 09:44:38.918 MsgNotFree[25760:2220650] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </Users/jasonzhu/Library/Developer/CoreSimulator/Devices/DDE42B9D-6304-4552-AD30-A1BFA3A7B3E0/data/Containers/Bundle/Application/D1282CEB-9914-4C37-BCD2-DC05675C9FD1/MsgNotFree.app> (loaded)' with name 'OverlayView''
*** First throw call stack:
(
0 CoreFoundation 0x000000010a227d85 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010c8d4deb objc_exception_throw + 48
2 CoreFoundation 0x000000010a227cbd +[NSException raise:format:] + 205
3 UIKit 0x000000010b720c89 -[UINib instantiateWithOwner:options:] + 499
4 UIKit 0x000000010b723415 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 223
5 MsgNotFree 0x0000000109eedd90 _TFC10MsgNotFree19FirstViewController6kolodafTCS_10KolodaView25viewForCardOverlayAtIndexSu_GSqCS_11OverlayView_ + 368
6 MsgNotFree 0x0000000109eedf92 _TToFC10MsgNotFree19FirstViewController6kolodafTCS_10KolodaView25viewForCardOverlayAtIndexSu_GSqCS_11OverlayView_ + 66
7 MsgNotFree 0x0000000109eee918 _TTDFC10MsgNotFree19FirstViewController6kolodafTCS_10KolodaView25viewForCardOverlayAtIndexSu_GSqCS_11OverlayView_ + 56
8 MsgNotFree 0x0000000109eee085 _TTWC10MsgNotFree19FirstViewControllerS_20KolodaViewDataSourceS_FS1_6kolodafTCS_10KolodaView25viewForCardOverlayAtIndexSu_GSqCS_11OverlayView_ + 53
9 Koloda 0x0000000109ff14f5 _TFC6Koloda10KolodaView13configureCardfTCS_17DraggableCardView7atIndexSu_T_ + 501
10 Koloda 0x0000000109ff15b2 _TToFC6Koloda10KolodaView13configureCardfTCS_17DraggableCardView7atIndexSu_T_ + 66
11 Koloda 0x0000000109ff1183 _TFC6Koloda10KolodaView17createCardAtIndexfTSu5frameGSqVSC6CGRect__CS_17DraggableCardView + 611
12 Koloda 0x0000000109ff292b _TFC6Koloda10KolodaViewP33_DFF55D12D516409CF60937DD60F8B8969setupDeckfT_T_ + 955
13 Koloda 0x0000000109ff1e60 _TFC6Koloda10KolodaViewW10dataSourceXwGSqPS_20KolodaViewDataSource__ + 32
14 Koloda 0x0000000109ff1f60 _TFC6Koloda10KolodaViews10dataSourceXwGSqPS_20KolodaViewDataSource__ + 160
15 MsgNotFree 0x0000000109eec73e _TFC10MsgNotFree19FirstViewController11viewDidLoadfT_T_ + 398
16 MsgNotFree 0x0000000109eec802 _TToFC10MsgNotFree19FirstViewController11viewDidLoadfT_T_ + 34
17 UIKit 0x000000010b4f3984 -[UIViewController loadViewIfRequired] + 1198
18 UIKit 0x000000010b4f3cd3 -[UIViewController view] + 27
19 UIKit 0x000000010b5571bc -[UITabBarController transitionFromViewController:toViewController:transition:shouldSetSelected:] + 502
20 UIKit 0x000000010b556130 -[UITabBarController transitionFromViewController:toViewController:] + 59
21 UIKit 0x000000010b551f41 -[UITabBarController _setSelectedViewController:] + 377
22 UIKit 0x000000010b551db7 -[UITabBarController setSelectedViewController:] + 234
23 UIKit 0x000000010b408680 +[UIView(Animation) performWithoutAnimation:] + 65
24 UIKit 0x000000010b54bddc -[UITabBarController _selectDefaultViewControllerIfNecessaryWithAppearanceTransitions:] + 344
25 UIKit 0x000000010b54d5df -[UITabBarController viewWillAppear:] + 193
26 UIKit 0x000000010b4f92bd -[UIViewController _setViewAppearState:isAnimating:] + 710
27 UIKit 0x000000010b4f9958 -[UIViewController __viewWillAppear:] + 149
28 UIKit 0x000000010b401255 -[UIView(Hierarchy) _willMoveToWindow:withAncestorView:] + 633
29 UIKit 0x000000010b40fc9e -[UIView(Internal) _addSubview:positioned:relativeTo:] + 481
30 UIKit 0x000000010b3ca29a -[UIWindow addRootViewControllerViewIfPossible] + 803
31 UIKit 0x000000010b3ca69d -[UIWindow _setHidden:forced:] + 282
32 UIKit 0x000000010b3dc180 -[UIWindow makeKeyAndVisible] + 42
33 UIKit 0x000000010b350ed9 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4131
34 UIKit 0x000000010b357568 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1769
35 UIKit 0x000000010b354714 -[UIApplication workspaceDidEndTransaction:] + 188
36 FrontBoardServices 0x000000010d40f8c8 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 24
37 FrontBoardServices 0x000000010d40f741 -[FBSSerialQueue _performNext] + 178
38 FrontBoardServices 0x000000010d40faca -[FBSSerialQueue _performNextFromRunLoopSource] + 45
39 CoreFoundation 0x000000010a14d301 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
40 CoreFoundation 0x000000010a14322c __CFRunLoopDoSources0 + 556
41 CoreFoundation 0x000000010a1426e3 __CFRunLoopRun + 867
42 CoreFoundation 0x000000010a1420f8 CFRunLoopRunSpecific + 488
43 UIKit 0x000000010b353f21 -[UIApplication _run] + 402
44 UIKit 0x000000010b358f09 UIApplicationMain + 171
45 MsgNotFree 0x0000000109eec272 main + 114
46 libdyld.dylib 0x00000001112d892d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
In which, OverlayView class could be referenced to in ViewController, which means the third-party class is being referred to correctly in the project level.
The demonstrating project is here
Could anyone give me some hint where the problem could be? Great thanks!
this error is due to there is no overlayView named .xib file in your bundle,
create a new file -> UserInterface -> View -> (rename it OverlayView)
now got OverlayView and select view there change its class to OverlayView.

AdBannerView Causing NSInvalidArguementException

I'm creating an Ad enabled application, and to the most part its been successful to how I wanted it, however recently my application started crashing with an NSInvalidArgumentException error whenever I start the application, after some serious debugging I've found that the cause of the error is when my ADBannerView delegate is linked to my UITableViewController class. I've implemented the ADBannerViewDelegate to my class so I can't understand what the issue with it is. I'm trying to keep my code as private as possible to avoid my idea to be recreated. So for now I'll be posting the crash log. If any other information is needed I'll post the bare minimum of what has been asked for
2014-07-09 16:48:32.268 <APPLICATION NAME>[3491:589625] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]'
*** First throw call stack:
(
0 CoreFoundation 0x00ee5646 __exceptionPreprocess + 182
1 libobjc.A.dylib 0x00b878e3 objc_exception_throw + 44
2 CoreFoundation 0x00ddc513 -[__NSPlaceholderDictionary initWithObjects:forKeys:count:] + 451
3 CoreFoundation 0x00df16bb +[NSDictionary dictionaryWithObjects:forKeys:count:] + 75
4 iAd 0x00688cf5 -[ADBannerView setDelegate:] + 161
5 Foundation 0x0077ace8 _NSSetUsingKeyValueSetter + 115
6 Foundation 0x0077ac6d -[NSObject(NSKeyValueCoding) setValue:forKey:] + 267
7 UIKit 0x0131b034 -[UIView(CALayerDelegate) setValue:forKey:] + 168
8 Foundation 0x007b0166 -[NSObject(NSKeyValueCoding) setValue:forKeyPath:] + 386
9 UIKit 0x015b3589 -[UIRuntimeOutletConnection connect] + 106
10 libobjc.A.dylib 0x00b9a6f4 -[NSObject performSelector:] + 62
11 CoreFoundation 0x00e2041c -[NSArray makeObjectsPerformSelector:] + 316
12 UIKit 0x015b1b8a -[UINib instantiateWithOwner:options:] + 1775
13 UIKit 0x013e074d -[UIViewController _loadViewFromNibNamed:bundle:] + 270
14 UIKit 0x013e0ff4 -[UIViewController loadView] + 295
15 UIKit 0x015d2266 -[UITableViewController loadView] + 77
16 UIKit 0x013e1222 -[UIViewController loadViewIfRequired] + 72
17 UIKit 0x014142bd -[UINavigationController _layoutViewController:] + 42
18 UIKit 0x014147bf -[UINavigationController _updateScrollViewFromViewController:toViewController:] + 235
19 UIKit 0x014148c3 -[UINavigationController _startTransition:fromViewController:toViewController:] + 90
20 UIKit 0x0141583a -[UINavigationController _startDeferredTransitionIfNeeded:] + 669
21 UIKit 0x0141645b -[UINavigationController __viewWillLayoutSubviews] + 57
22 UIKit 0x01580c40 -[UILayoutContainerView layoutSubviews] + 213
23 UIKit 0x0131b3dc -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 601
24 libobjc.A.dylib 0x00b9a741 -[NSObject performSelector:withObject:] + 70
25 QuartzCore 0x005703e9 -[CALayer layoutSublayers] + 152
26 QuartzCore 0x00564245 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 397
27 QuartzCore 0x005640a0 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 26
28 QuartzCore 0x004c3836 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 284
29 QuartzCore 0x004c4bfc _ZN2CA11Transaction6commitEv + 392
30 QuartzCore 0x00589689 +[CATransaction flush] + 52
31 UIKit 0x0129012e -[UIApplication _reportMainSceneUpdateFinished:] + 39
32 UIKit 0x01291023 -[UIApplication _runWithMainScene:transitionContext:completion:] + 3027
33 UIKit 0x012a8eb8 __84-[UIApplication _handleApplicationActivationWithScene:transitionContext:completion:]_block_invoke + 59
34 UIKit 0x0128f77e -[UIApplication workspaceDidEndTransaction:] + 29
35 FrontBoardServices 0x06e43f1f -[FBSWorkspace clientEndTransaction:] + 87
36 FrontBoardServices 0x06e4b4ed __53-[FBSWorkspaceClient _queue_handleTransactionBookEnd]_block_invoke + 49
37 CoreFoundation 0x00e09f90 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 16
38 CoreFoundation 0x00dff133 __CFRunLoopDoBlocks + 195
39 CoreFoundation 0x00dfe898 __CFRunLoopRun + 936
40 CoreFoundation 0x00dfe22b CFRunLoopRunSpecific + 443
41 CoreFoundation 0x00dfe05b CFRunLoopRunInMode + 123
42 UIKit 0x0128f095 -[UIApplication _run] + 571
43 UIKit 0x012926e5 UIApplicationMain + 1526
44 AppIdeas 0x0001a4ed main + 141
45 libdyld.dylib 0x02ca1ac9 start + 1
46 ??? 0x00000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
Also, I'd like to point out that I'm not using an NSPlaceholderDictionary at all in my program, nor am I using the method initWithObjects:forKeys:count:
Hopefully you guys should be able to help with this, thanks for you help
EDIT: I'd Also like to point out that All my other Pages (Part of a UITabBarController) load the ads fine, with the delegate added like the first page, it only happens on the application launch for the first view to come into focus... Is there something I'm missing?

Resources