0

I have a SIGABRT error:

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle (loaded)' with name 'SliderGaloreController''

I have looked at another question quite similar to mine, but I still can't fix it.

Here are the contents of my AppDelegate.h:

#import <UIKit/UIKit.h>

@class SliderGaloreController;

@interface SliderGaloreAppDelegate : UIResponder <UIApplicationDelegate>

@property (strong, nonatomic) UIWindow *window;

@property (strong, nonatomic) SliderGaloreController *sliderGaloreController;

Here are the contents of my AppDelegate.m:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:
(NSDictionary *)launchOptions {
NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];

if ([prefs objectForKey:@"PuzzlePicture"] == nil) {
    [prefs setBool:FALSE forKey:@"Refresh"];
    [prefs setInteger:0 forKey:@"PuzzlePicture"];
    [prefs setBool:TRUE forKey:@"CountMoves"];
    [prefs setBool:TRUE forKey:@"Timer"];
    [prefs setInteger:1 forKey:@"PuzzleLayoutX"];
    [prefs setInteger:1 forKey:@"PuzzleLayoutY"];
}

self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.sliderGaloreController = [[SliderGaloreController alloc]           
initWithNibName:@"SliderGaloreController" bundle:nil];
self.window.rootViewController = self.sliderGaloreController;
[self.window makeKeyAndVisible];

return YES;

Could someone please identify what I have done wrong? This error doesn't allow me to Run my app... Thanks in advance.

UPDATE 1: Fixing up code

user3863704
  • 181
  • 1
  • 1
  • 5

1 Answers1

0

Xcode doesn't like it when you rename or move files around. It appears that it can't locate the nib file named "SliderGaloreController.xib". Confirm that you definitely have a file in your project named "SliderGaloreController.xib". Triple check for typos.

Also, if you recently changed the nib (.xib file) name then you may have to remove the file from your project and then re-add it again.

Here is more info on your error that could be helpful: NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle

Community
  • 1
  • 1
Austen Chongpison
  • 3,966
  • 1
  • 20
  • 17