user2715167
user2715167

Reputation:

how to fix xcode AppDelegate error while running project?

I am a very beginner in iOS development and it's my first project in Xcode 6.4. Although my project is empty (I didn't write any code yet) it's crashing while running on the simulator. Can anybody please help me fixing this issue?

here's a screenshot https://i.sstatic.net/UgCTh.jpg

UPDATE - Error log

2015-08-01 23:20:50.692 ID[3688:177216] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<ID.ViewController 0x7867cc40> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key doneEditting.'
*** First throw call stack:
(
    0   CoreFoundation                      0x0026e746 __exceptionPreprocess + 182
    1   libobjc.A.dylib                     0x01c72a97 objc_exception_throw + 44
    2   CoreFoundation                      0x0026e361 -[NSException raise] + 17
    3   Foundation                          0x006f91ee -[NSObject(NSKeyValueCoding) setValue:forUndefinedKey:] + 282
    4   Foundation                          0x00656608 _NSSetUsingKeyValueSetter + 115
    5   Foundation                          0x0065658d -[NSObject(NSKeyValueCoding) setValue:forKey:] + 267
    6   Foundation                          0x0068c016 -[NSObject(NSKeyValueCoding) setValue:forKeyPath:] + 386
    7   UIKit                               0x00ddf622 -[UIRuntimeOutletConnection connect] + 106
    8   libobjc.A.dylib                     0x01c88724 -[NSObject performSelector:] + 62
    9   CoreFoundation                      0x001a647c -[NSArray makeObjectsPerformSelector:] + 316
    10  UIKit                               0x00dde0e3 -[UINib instantiateWithOwner:options:] + 1775
    11  UIKit                               0x00bf80d4 -[UIViewController _loadViewFromNibNamed:bundle:] + 270
    12  UIKit                               0x00bf886b -[UIViewController loadView] + 295
    13  UIKit                               0x00bf8a9f -[UIViewController loadViewIfRequired] + 78
    14  UIKit                               0x00bf9045 -[UIViewController view] + 35
    15  UIKit                               0x00aeae35 -[UIWindow addRootViewControllerViewIfPossible] + 66
    16  UIKit                               0x00aeb2fc -[UIWindow _setHidden:forced:] + 287
    17  UIKit                               0x00aeb5f8 -[UIWindow _orderFrontWithoutMakingKey] + 49
    18  UIKit                               0x00af9966 -[UIWindow makeKeyAndVisible] + 80
    19  UIKit                               0x00a8ee88 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 3217
    20  UIKit                               0x00a923d2 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1639
    21  UIKit                               0x00aab8ee __84-[UIApplication _handleApplicationActivationWithScene:transitionContext:completion:]_block_invoke + 59
    22  UIKit                               0x00a90ffa -[UIApplication workspaceDidEndTransaction:] + 155
    23  FrontBoardServices                  0x0363fc9e __37-[FBSWorkspace clientEndTransaction:]_block_invoke_2 + 71
    24  FrontBoardServices                  0x0363f72f __40-[FBSWorkspace _performDelegateCallOut:]_block_invoke + 54
    25  FrontBoardServices                  0x03651d7c __31-[FBSSerialQueue performAsync:]_block_invoke_2 + 30
    26  CoreFoundation                      0x00190050 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 16
    27  CoreFoundation                      0x00185963 __CFRunLoopDoBlocks + 195
    28  CoreFoundation                      0x001850eb __CFRunLoopRun + 971
    29  CoreFoundation                      0x00184a5b CFRunLoopRunSpecific + 443
    30  CoreFoundation                      0x0018488b CFRunLoopRunInMode + 123
    31  UIKit                               0x00a909b2 -[UIApplication _run] + 571
    32  UIKit                               0x00a940b6 UIApplicationMain + 1526
    33  ID                                  0x0007e4d4 main + 180
    34  libdyld.dylib                       0x0236fac9 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb) 

Upvotes: 0

Views: 7600

Answers (3)

user2715167
user2715167

Reputation:

Well thank you all for your help. I figured out how to solve my problem. I clicked on each and every element on my Main.storyboard and went to the Show the Connections inspector in the Utilities (right sidebar) and deleted every connection each element on my storyboard had.

Upvotes: 0

ecatalano
ecatalano

Reputation: 687

Ok. Here is the important part of your error to look for in future cases for troubleshooting:

2015-08-01 23:20:50.692 ID[3688:177216] *** Terminating app due to uncaught 
exception 'NSUnknownKeyException', reason: '[<ID.ViewController 0x7867cc40> 
setValue:forUndefinedKey:]: 
this class is not key value coding-compliant for the key doneEditting.'

Check your methods for something named "doneEditting"

My guess is that you accidentally added an extra "t" in the word editing, which is what caused the problem.

Upvotes: 2

Yalamandarao
Yalamandarao

Reputation: 3862

Might be issue with outlet connection. You may rename the outlet connection name.

Do one thing restart Xcode and clean your Xcode and then run the application simulator or device. I hope it will work.

Upvotes: 3

Related Questions