ios - 11DB Terminating app due to uncaught exception 'NSInternalInconsistencyException' -
i rookie in objective c. writing login feature in xcode. crashes. seeking help!
2016-02-06 03:14:09.331 login[3466:392205] * terminating app due uncaught exception 'nsinternalinconsistencyexception', reason: 'could not load nib in bundle: 'nsbundle (loaded)' 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 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 @ main.m:14 frame #13: 0x00000001042a592d libdyld.dylib`start + 1 (lldb)
to fix problem,in 2 ways:
option-1
regarding nib name. check nib name spelling, it's correct, case sensitive.
option-2
if option -1 not work try
- open xcode target
- go "build phases" tab
- click "copy bundle resources" section
- click add button
- add missing nib file
then works fine
Comments
Post a Comment