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

  • Home
  • SEARCH
  • 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 6920859
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:12:08+00:00 2026-05-27T10:12:08+00:00

I have a universal app but this issue seems to only relate to the

  • 0

I have a universal app but this issue seems to only relate to the iPad and not the iPhone since the iPhone version loads the correct XIB.

So pretty much the issue is, it is not loading my main XIB for my app. I named the XIB’s like so:

  1. For iPhone: MyViewController.xib

    1. For iPad: MyViewController_iPad.xib

Also I deleted my MainWindow.xib because in the template project for a universal app it shows no MainWindow.xib anywhere.

This is how I am trying to load the view on app launch:

self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
        self.viewController = [[[ocrapiViewController alloc] initWithNibName:@"MyViewController" bundle:nil] autorelease];
    } else {
        self.viewController = [[[ocrapiViewController alloc] initWithNibName:@"MyViewController_iPad" bundle:nil] autorelease];
    }
 self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];
return YES;

This is the crash info:
A SIGABRT on this line [self.window makeKeyAndVisible];

And this is the crash log:

2011-12-07 07:37:46.560 ocrapi[763:607] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </var/mobile/Applications/29F4CD7A-149E-46EA-B280-3D188PP19D17/.app> (loaded)' with name 'MyViewController_iPad''

Edit1:
Here is the message:

warning: No copy of <No file name> found locally, reading from memory on remote device.  This may slow down the debug session.

Also if I click on my products then do show in finder, then do show package contents, MyViewController.xib or MyViewController_iPad.xib is not there. Is it supposed to be like that?

  • 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-27T10:12:09+00:00Added an answer on May 27, 2026 at 10:12 am

    Make sure your nib really really really is called MyViewController_iPad.xib, with that exact capitalization.

    Make sure the xib file is in your target’s list of things to be copied to the app on build.

    Finally, make sure you’ve no Main Nib setting still in your Info.plist file.

    Oh, and one more thing. There is no need for this code:

    if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
        self.viewController = [[[ocrapiViewController alloc] initWithNibName:@"MyViewController" bundle:nil] autorelease];
    } else {
        self.viewController = [[[ocrapiViewController alloc] initWithNibName:@"MyViewController_iPad" bundle:nil] autorelease];
    }
    

    Simply call initWithNibName:@"MyViewController". If your iPad nib is named MyViewController~ipad.xib (note the twiddle, note the lowercase “ipad”) it will be chosen automatically when you’re on an iPad.

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

Sidebar

Related Questions

I have a universal app and for each device (iPad, iPhone) have different sets
In my universal app i have added one empty xib for iphone(ipad app converted
I have a Universal app (iPhone/iPad) testing on IOS4.3. It has an iAd which
I have the following code for my universal app but I'm getting this weird
I have written a universal iOS-App that runs fine on my iPhone and iPad,
I am creating an ipad and iphone (Universal App). I have implemented Paypal in
I have a universal app for ipad and iphone. What I'm trying to determine
So I'm making a universal app (iphone3gs/iphone4/ipad/)... But I have a question about images.
I have finished developing a big and heavy app. It is universal (for iPhone
I have a universal data type, which is passed by value, but does 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.