我是IOS开发的新手,我试图修改一个旧的应用程序。一切都在我的旧Mac(XCode 4.6)上运行,但是当我将它转移到我的新Macbook pro并使用最新版本的Xcode时,我在启动时遇到了这个错误:
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
这是我的main.h:
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char *argv[])
{
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}
经过一些搜索,很多关于.xib文件的所有者的修复,所以我将我的第一个窗口链接到视图,但它没有用...
我的xib文件所有者标签中的Printscreen: http://i.stack.imgur.com/iyzkk.png
我会继续照顾这个问题,但如果有人可以帮助我,那将是非常好的;)
感谢您的时间,
Guy Volluz