Whenever I try to Run the IOS Simulator, it keeps crashing. I work on Xcode 5.0.2. On the main.m file it says
Thread 1:SIGABRT. Heres is the line where the SIGABRT appeared.
return UIApplicationMain(argc, argv, nil, NSStringFromClass([xyzAppDelegate class]));
heres what was going on in the main.m
#import <UIKit/UIKit.h>
#import "xyzAppDelegate.h"
int main(int argc, char * argv[])
{
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([xyzAppDelegate class]));
}
}
xyzAppDelegate.h
#import <UIKit/UIKit.h>
@interface xyzAppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end
xyzAppDelegate.m
#import "xyzAppDelegate.h"
@implementation xyzAppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions: (NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.window.backgroundColor = [UIColor whiteColor];
[self.window makeKeyAndVisible];
return YES;
}
- (void)applicationWillResignActive:(UIApplication *)application
{
}
- (void)applicationDidEnterBackground:(UIApplication *)application
{
}
- (void)applicationWillEnterForeground:(UIApplication *)application
{
}
- (void)applicationDidBecomeActive:(UIApplication *)application
{
}
- (void)applicationWillTerminate:(UIApplication *)application
{
}
@end
Here is what it shows on the debug area
2014-02-13 00:06:47.933 ToDoList[707:70b] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </Users/garibaldi/Library/Application Support/iPhone Simulator/7.0.3/Applications/8B1ABBAB-D173-4A8E-80AC-8DEA44C5EDE8/ToDoList.app> (loaded)' with name 'Main''
*** First throw call stack:
(
0 CoreFoundation 0x0174c5e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x014bb8b6 objc_exception_throw + 44
2 CoreFoundation 0x0174c3bb +[NSException raise:format:] + 139
3 UIKit 0x004ca39c -[UINib instantiateWithOwner:options:] + 951
4 UIKit 0x004cc2fb -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 165
5 UIKit 0x002293bb -[UIApplication _loadMainNibFileNamed:bundle:] + 58
6 UIKit 0x002296e9 -[UIApplication _loadMainInterfaceFile] + 245
7 UIKit 0x0022828f -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 543
8 UIKit 0x0023c87c -[UIApplication handleEvent:withNewEvent:] + 3447
9 UIKit 0x0023cde9 -[UIApplication sendEvent:] + 85
10 UIKit 0x0022a025 _UIApplicationHandleEvent + 736
11 GraphicsServices 0x036df2f6 _PurpleEventCallback + 776
12 GraphicsServices 0x036dee01 PurpleEventCallback + 46
13 CoreFoundation 0x016c7d65 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
14 CoreFoundation 0x016c7a9b __CFRunLoopDoSource1 + 523
15 CoreFoundation 0x016f277c __CFRunLoopRun + 2156
16 CoreFoundation 0x016f1ac3 CFRunLoopRunSpecific + 467
17 CoreFoundation 0x016f18db CFRunLoopRunInMode + 123
18 UIKit 0x00227add -[UIApplication _run] + 840
19 UIKit 0x00229d3b UIApplicationMain + 1225
20 ToDoList 0x0000219d main + 141
21 libdyld.dylib 0x01d7670d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
I tried following Apple's First Tutorial. Sorry if I'm not clear enough, I'm still kinda new here.
Try resetting the simulator.
I'm sorry I cannot yet upload images, but:
(If simulator is not running)
In XCode, go to XCode menu (one left of 'File') on top, 'Open Developer Tool' > 'iOS Simulator'.
In the simulator, click on the 'iOS Simulator menu' > 'Rest Content And Settings...'
Try resetting the simulator (as in @bauerMusic's answer) and then restart your Mac. That consistently fixes a similar issue I have.
User contributions licensed under CC BY-SA 3.0