2011-03-15 51 views
1

我想在xcode 4中使用基于视图的应用程序模板创建一个多视图iOS(4.3)应用程序,但迄今为止没有运气。一切都会建立,但之后崩溃没有错误,我得到SIGABRT的消息“int retVal = UIApplicationMain(argc,argv,nil,nil);”在支持文件 - > main.mxcode 4 iOS 4.3项目模板不起作用

同样的事情发生在我的应用程序和xcode的普通(基于视图的应用程序)模板。

任何想法可能是什么问题?

这里的日志:

GNU gdb 6.3.50-20050815 (Apple version gdb-1518) (Sat Feb 12 02:52:12 UTC 2011) 
Copyright 2004 Free Software Foundation, Inc. 
GDB is free software, covered by the GNU General Public License, and you are 
welcome to change it and/or distribute copies of it under certain conditions. 
Type "show copying" to see the conditions. 
There is absolutely no warranty for GDB. Type "show warranty" for details. 

This GDB was configured as "x86_64-apple-darwin".Attaching to process 3884. 
2011-03-15 18:18:16.226 Server-sideStory[3884:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'UISplitViewController is only supported when running under UIUserInterfaceIdiomPad' 
*** Call stack at first throw: 
(
    0 CoreFoundation      0x00dc45a9 __exceptionPreprocess + 185 
    1 libobjc.A.dylib      0x00f18313 objc_exception_throw + 44 
    2 CoreFoundation      0x00d7cef8 +[NSException raise:format:arguments:] + 136 
    3 CoreFoundation      0x00d7ce6a +[NSException raise:format:] + 58 
    4 UIKit        0x0031d512 -[UISplitViewController _commonInit] + 165 
    5 UIKit        0x0031d971 -[UISplitViewController initWithCoder:] + 92 
    6 Foundation       0x00784c24 _decodeObjectBinary + 3296 
    7 Foundation       0x00783d91 _decodeObject + 224 
    8 UIKit        0x00211979 -[UIRuntimeConnection initWithCoder:] + 212 
    9 Foundation       0x00784c24 _decodeObjectBinary + 3296 
    10 Foundation       0x007859f5 -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 1354 
    11 Foundation       0x00786024 -[NSArray(NSArray) initWithCoder:] + 596 
    12 Foundation       0x00784c24 _decodeObjectBinary + 3296 
    13 Foundation       0x00783d91 _decodeObject + 224 
    14 UIKit        0x00210c36 -[UINib instantiateWithOwner:options:] + 804 
    15 UIKit        0x00212ab7 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 168 
    16 UIKit        0x0001817a -[UIApplication _loadMainNibFile] + 172 
    17 UIKit        0x00018cf4 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 291 
    18 UIKit        0x00023617 -[UIApplication handleEvent:withNewEvent:] + 1533 
    19 UIKit        0x0001babf -[UIApplication sendEvent:] + 71 
    20 UIKit        0x00020f2e _UIApplicationHandleEvent + 7576 
    21 GraphicsServices     0x00ffd992 PurpleEventCallback + 1550 
    22 CoreFoundation      0x00da5944 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52 
    23 CoreFoundation      0x00d05cf7 __CFRunLoopDoSource1 + 215 
    24 CoreFoundation      0x00d02f83 __CFRunLoopRun + 979 
    25 CoreFoundation      0x00d02840 CFRunLoopRunSpecific + 208 
    26 CoreFoundation      0x00d02761 CFRunLoopRunInMode + 97 
    27 UIKit        0x000187d2 -[UIApplication _run] + 623 
    28 UIKit        0x00024c93 UIApplicationMain + 1160 
    29 Server-sideStory     0x00002719 main + 121 
    30 Server-sideStory     0x00002695 start + 53 
) 
terminate called after throwing an instance of 'NSException' 
sharedlibrary apply-load-rules all 
Current language: auto; currently objective-c 

回答

5

它告诉你,UISplitViewController不支持在iPhone上 - 只能在iPad上。