1
votes

I'm trying to create a multi-view iOS (4.3) application in xcode 4 using the view-based application template but have so far had no luck. Everything builds but then crashes without error, with me getting the message SIGABRT in the line "int retVal = UIApplicationMain(argc, argv, nil, nil);" in supporting file-> main.m

The same thing happens in both my application and the plain (view-based application ) template from xcode.

Any ideas what the problem might be?

Here's the log:

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
1

1 Answers

5
votes

It's telling you that UISplitViewController is not supported on the iPhone - only works on the iPad.