Reputation: 33
I a rookie in OBjective C. I am writing a login feature in Xcode. But it crashes. Seeking for help!
2016-02-06 03:14:09.331 Login[3466:392205] * Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle (loaded)' with name 'ViewController'' * First throw call stack: ( 0 CoreFoundation 0x0000000101b81f45 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x00000001015fbdeb objc_exception_throw + 48
2 CoreFoundation 0x0000000101b81e7d +[NSException raise:format:] + 205
3 UIKit 0x00000001022e4eff -[UINib instantiateWithOwner:options:] + 499
4 UIKit 0x00000001020bfc16 -[UIViewController _loadViewFromNibNamed:bundle:] + 381
5 UIKit 0x00000001020c0542 -[UIViewController loadView] + 178
6 UIKit 0x00000001020c08a0 -[UIViewController loadViewIfRequired] + 138
7 UIKit 0x00000001020c1013 -[UIViewController view] + 27
8 UIKit 0x0000000101f9a51c -[UIWindow addRootViewControllerViewIfPossible] + 61
9 UIKit 0x0000000101f9ac05 -[UIWindow _setHidden:forced:] + 282
10 UIKit 0x0000000101fac4a5 -[UIWindow makeKeyAndVisible] + 42
11 UIKit 0x0000000101f26396 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4131
12 UIKit 0x0000000101f2c9c3 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1750
13 UIKit 0x0000000101f29ba3 -[UIApplication workspaceDidEndTransaction:] + 188
14 FrontBoardServices 0x00000001048d9784 -[FBSSerialQueue _performNext] + 192
15 FrontBoardServices 0x00000001048d9af2 -[FBSSerialQueue _performNextFromRunLoopSource] + 45
16 CoreFoundation 0x0000000101aae011 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
17 CoreFoundation 0x0000000101aa3f3c __CFRunLoopDoSources0 + 556
18 CoreFoundation 0x0000000101aa33f3 __CFRunLoopRun + 867
19 CoreFoundation 0x0000000101aa2e08 CFRunLoopRunSpecific + 488
20 UIKit 0x0000000101f294f5 -[UIApplication _run] + 402
21 UIKit 0x0000000101f2e30d UIApplicationMain + 171
22 Login 0x00000001010fd33f main + 111
23 libdyld.dylib 0x00000001042a592d start + 1
24 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb) bt
* thread #1: tid = 0x5fc0d, 0x00000001045db286 libsystem_kernel.dylib__pthread_kill + 10, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
frame #0: 0x00000001045db286 libsystem_kernel.dylib
__pthread_kill + 10
frame #1: 0x00000001045a49f9 libsystem_pthread.dylibpthread_kill + 90
frame #2: 0x000000010434ca44 libsystem_c.dylib
abort + 129
frame #3: 0x000000010414a051 libc++abi.dylibabort_message + 257
frame #4: 0x000000010416fac9 libc++abi.dylib
default_terminate_handler() + 267
frame #5: 0x00000001015fc046 libobjc.A.dylib_objc_terminate() + 103
frame #6: 0x000000010416d26e libc++abi.dylib
std::__terminate(void (*)()) + 8
frame #7: 0x000000010416cef9 libc++abi.dylib__cxa_rethrow + 99
frame #8: 0x00000001015fbf5e libobjc.A.dylib
objc_exception_rethrow + 40
frame #9: 0x0000000101aa2ec4 CoreFoundationCFRunLoopRunSpecific + 676
frame #10: 0x0000000101f294f5 UIKit
-[UIApplication _run] + 402
frame #11: 0x0000000101f2e30d UIKitUIApplicationMain + 171
* frame #12: 0x00000001010fd33f Login
main(argc=1, argv=0x00007fff5eb02650) + 111 at main.m:14
frame #13: 0x00000001042a592d libdyld.dylib`start + 1
(lldb)
Upvotes: 1
Views: 1555
Reputation: 82759
To fix the problem,in Two ways:
Option-1
regarding the nib name. Check the nib name spelling, it's correct, case sensitive.
Option-2
if option -1 does not work try this
then works fine
Upvotes: 0