IOS App Crash at launch

2019-09-06 21:05发布

问题:

I'm new in IOS development and i tried to modify an old app. Everything worked on my old mac (XCode 4.6) but when i transfer it to my new macbook pro with the last version of Xcode, i got this error on launch :

2015-01-15 12:06:00.998 GeneveImmo[5330:161539] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIApplication 0x7974cfd0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key view.'

*** First throw call stack:
(
0   CoreFoundation                      0x025e9946 __exceptionPreprocess + 182
1   libobjc.A.dylib                     0x0206da97 objc_exception_throw + 44
2   CoreFoundation                      0x025e9561 -[NSException raise] + 17
3   Foundation                          0x01cf510e -[NSObject(NSKeyValueCoding) setValue:forUndefinedKey:] + 282
4   Foundation                          0x01c51138 _NSSetUsingKeyValueSetter + 115
5   Foundation                          0x01c510bd -[NSObject(NSKeyValueCoding) setValue:forKey:] + 267
6   Foundation                          0x01c869a6 -[NSObject(NSKeyValueCoding) setValue:forKeyPath:] + 386
7   UIKit                               0x00d7a649 -[UIRuntimeOutletConnection connect] + 106
8   libobjc.A.dylib                     0x02083724 -[NSObject performSelector:] + 62
9   CoreFoundation                      0x025235dc -[NSArray makeObjectsPerformSelector:] + 316
10  UIKit                               0x00d7910a -[UINib instantiateWithOwner:options:] + 1775
11  UIKit                               0x00d7afa9 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 180
12  UIKit                               0x00a43e1b -[UIApplication _loadMainNibFileNamed:bundle:] + 58
13  UIKit                               0x00a44134 -[UIApplication _loadMainInterfaceFile] + 245
14  UIKit                               0x00a42adf -[UIApplication _runWithMainScene:transitionContext:completion:] + 1337
15  UIKit                               0x00a5b7d0 __84-[UIApplication _handleApplicationActivationWithScene:transitionContext:completion:]_block_invoke + 59
16  UIKit                               0x00a4181f -[UIApplication workspaceDidEndTransaction:] + 155
17  FrontBoardServices                  0x0a2c49de __37-[FBSWorkspace clientEndTransaction:]_block_invoke_2 + 71
18  FrontBoardServices                  0x0a2c446f __40-[FBSWorkspace _performDelegateCallOut:]_block_invoke + 54
19  FrontBoardServices                  0x0a2d6425 __31-[FBSSerialQueue performAsync:]_block_invoke + 26
20  CoreFoundation                      0x0250d1c0 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 16
21  CoreFoundation                      0x02502ad3 __CFRunLoopDoBlocks + 195
22  CoreFoundation                      0x0250292b __CFRunLoopRun + 2715
23  CoreFoundation                      0x02501bcb CFRunLoopRunSpecific + 443
24  CoreFoundation                      0x025019fb CFRunLoopRunInMode + 123
25  UIKit                               0x00a411e4 -[UIApplication _run] + 571
26  UIKit                               0x00a448b6 UIApplicationMain + 1526
27  GeneveImmo                          0x000980bd main + 141
28  libdyld.dylib                       0x03b05ac9 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

Here's my main.h :

#import <UIKit/UIKit.h>
#import "AppDelegate.h"

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

After some search, lots of fix were about the .xib file's owner, so i linked my first windows to the view but it didn't worked...

Printscreen from my xib's file owner's tab : http://i.stack.imgur.com/iyzkk.png

I'll continue to look after this problem but if someone can help me it would be very nice ;)

Thanks for your time,

Guy Volluz