0

Error refers to my main.m, not sure what to do to fix, tried a lot.

int main(int argc, char * argv[]) {
    @autoreleasepool {
        return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
    }
}

Appreciate the help. Here is the crash log:

2014-12-31 01:49:28.838 iChat[4855:142422] Failed to instantiate the default view controller for UIMainStoryboardFile 'Main' - perhaps the designated entry point is not set?
2014-12-31 01:49:28.922 iChat[4855:142422] Application windows are expected to have a root view controller at the end of application launch
2014-12-31 01:49:30.342 iChat[4855:142422] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<LoginViewController 0x7f8763d77870> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key forgotPasswordButton.'
*** First throw call stack:
(
    0   CoreFoundation                      0x000000010a627f35 __exceptionPreprocess + 165
    1   libobjc.A.dylib                     0x000000010a2c0bb7 objc_exception_throw + 45
    2   CoreFoundation                      0x000000010a627b79 -[NSException raise] + 9
    3   Foundation                          0x00000001074477b3 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 259
    4   CoreFoundation                      0x000000010a571e80 -[NSArray makeObjectsPerformSelector:] + 224
    5   UIKit                               0x0000000107b80c7d -[UINib instantiateWithOwner:options:] + 1506
    6   UIKit                               0x00000001079dff98 -[UIViewController _loadViewFromNibNamed:bundle:] + 242
    7   UIKit                               0x00000001079e0588 -[UIViewController loadView] + 109
    8   UIKit                               0x00000001079e07f9 -[UIViewController loadViewIfRequired] + 75
    9   UIKit                               0x0000000107a0f06b -[UINavigationController _layoutViewController:] + 44
    10  UIKit                               0x0000000107a0f5b5 -[UINavigationController _updateScrollViewFromViewController:toViewController:] + 216
    11  UIKit                               0x0000000107a0f6b4 -[UINavigationController _startTransition:fromViewController:toViewController:] + 92
    12  UIKit                               0x0000000107a10487 -[UINavigationController _startDeferredTransitionIfNeeded:] + 523
    13  UIKit                               0x0000000107a10f47 -[UINavigationController __viewWillLayoutSubviews] + 43
    14  UIKit                               0x0000000107b56509 -[UILayoutContainerView layoutSubviews] + 202
    15  UIKit                               0x0000000107934973 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 521
    16  QuartzCore                          0x0000000106bbcde8 -[CALayer layoutSublayers] + 150
    17  QuartzCore                          0x0000000106bb1a0e _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 380
    18  QuartzCore                          0x0000000106bb187e _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
    19  QuartzCore                          0x0000000106b1f63e _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 242
    20  QuartzCore                          0x0000000106b2074a _ZN2CA11Transaction6commitEv + 390
    21  UIKit                               0x00000001078de022 _afterCACommitHandler + 123
    22  CoreFoundation                      0x000000010a55cdc7 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
    23  CoreFoundation                      0x000000010a55cd20 __CFRunLoopDoObservers + 368
    24  CoreFoundation                      0x000000010a552b53 __CFRunLoopRun + 1123
    25  CoreFoundation                      0x000000010a552486 CFRunLoopRunSpecific + 470
    26  GraphicsServices                    0x000000010bccd9f0 GSEventRunModal + 161
    27  UIKit                               0x00000001078bb420 UIApplicationMain + 1282
    28  iSociety                            0x00000001065a8b83 main + 115
    29  libdyld.dylib                       0x000000010b822145 start + 1
    30  ???                                 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)

Now I understand it would be coming from LoginViewController as this is the initial controller where the user logs in but there are buttons in which the user can "sign up" or "forgot password". At first it would crash everytime I would try clicking sign up but soon enough it crashed in general.

jtbandes
  • 115,675
  • 35
  • 233
  • 266
Gavin
  • 661
  • 2
  • 7
  • 10

1 Answers1

0

It would be better if you can post crash log along with the question.

But most of the time, this error occurs due to dangling connection with XIB/Storyboards like this:

enter image description here

Remove this connections which contains "!" exclamation mark on it.

Update : Another reason:

If one forgets to set initial view controller to the start point of scene.

enter image description here

Mrunal
  • 13,982
  • 6
  • 52
  • 96
  • Yeah, I know what your talking about, I spent an hour or two last night trying to find those segues that should not be there or are incorrectly made but had no luck so far so if you are able to spot anything specific from the updated crash log I posted please let me know so I'd know exactly what to do next. Thanks again. – Gavin Dec 31 '14 at 21:13
  • @Gavin : Check my update in ans. – Mrunal Jan 02 '15 at 07:36