Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6047085
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:18:45+00:00 2026-05-23T07:18:45+00:00

I deleted all my .xib files a while ago, and recently changed my identifier.

  • 0

I deleted all my .xib files a while ago, and recently changed my identifier. Now its started giving me this error:

Terminating app due to uncaught
exception
‘NSInternalInconsistencyException’,
reason: ‘Could not load NIB in bundle:
‘NSBundle
(loaded)’ with name
‘MainWindow”

MainWindow was deleted a while ago, and removing MainWindow from deployment info means that I’m just given a black screen. This is the code i have in my app delegate:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    

    [application setStatusBarStyle:UIStatusBarStyleBlackOpaque];
    [window addSubview:navigationController.view];
    [self.window makeKeyAndVisible];

    return YES;
}

Am i missing something? I presume i should remove MainWindow but as i say, this is just giving me a black screen.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T07:18:46+00:00Added an answer on May 23, 2026 at 7:18 am

    You are getting this error because the NSMainNibFile value is set in your Info.plist. It tells the OS to open that NIB file at launch. Since you’re doing away with NIBs for some reason, you will have to fill in the holes that you’ve created by deleting the NIB file.

    1. You’ve to delete the key from the Info.plist.
    2. You have to make some changes in your main.m. Usually the MainWindow.xib contained the information about your application delegate but now you need to provide it. Find the line that reads int retVal = UIApplicationMain(argc, argv, nil, nil); and replace it with int retVal = UIApplicationMain(argc, argv, nil, @"yourDelegateClassName");

    3. What you’ve done so far will instantiate the application delegate and your application:didFinishLaunchingWithOptions: will get called but your window isn’t set yet as it was taken care of by the NIB file again. This will apply to all your outlets. Not only your `window.

    You will have to make some additions to your application:didFinishLaunchingWithOptions: method like this,

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    
        // Instantiate Window
        self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
    
        // Instantiate Root view controller
        RootViewController * viewController = [[[RootViewController alloc] init] autorelease];
    
        // Instantiate navigation controller
        navigationController = [[UINavigationController alloc] initWithRootViewController:viewController];
    
        [application setStatusBarStyle:UIStatusBarStyleBlackOpaque];
        [window addSubview:navigationController.view];
        [self.window makeKeyAndVisible];
    
        return YES;
    }
    

    The above method is just a template and must be modified to your requirement.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to get a list of all files modified/added/deleted by a particular
I deleted all of the files from an svn repo. I then tried to
Are primitives worth keeping? Should all the deprecated stuff be deleted? Do we need
I erroneously delete all the rows from a MS SQL 2000 table that is
I want to delete all but the 4 newest directories in my parent directory.
I had to delete all the rows from a log table that contained about
I want to delete all directories and subdirectories under a root directory that are
How do you delete all the cookies for the current domain using JavaScript?
How can I delete all the tables in a web page? The tables don't
How do I pick/ delete all the documents from Solr using the boolean NOT

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.