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 8035985
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T02:28:18+00:00 2026-06-05T02:28:18+00:00

I made a universal application that contains NIB files for both ipad and iphone

  • 0

I made a universal application that contains NIB files for both ipad and iphone UI’s. In my view controllers initWithNibName method I call UIUserInterfaceIdiomPad == UI_USER_INTERFACE_IDIOM() to detect whether the controller is running on iphone or ipad.

I then launch their respective nib files. When I run the app on iphone, it works fine, but when I run it on ipad it eventually crashes with a EXC_BAD_ACCESS error. This error occurs when I use a view controller to launch another view controller, which then launches another one in the navigation stack. This error occurs as soon as I click the view that belongs to the third controller of the stack.

I cannot distinguish a difference between the NIB files that would cause a crash. I have been working tirelessly to figure out why this is happening but I cannot fix this error. Does anyone have any insight into what might be going on?

Any advice on how to approach fixing this problem would be very appreciated.

  • 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-06-05T02:28:20+00:00Added an answer on June 5, 2026 at 2:28 am

    The first thing you should do is enable the “All Exceptions” break point. This will often accurately tell you the line of code where the EXC_BAD_ACCESS is happening.

    enter image description here

    Next, I would turn on zombies and see where the over-release is happening. To do so, in Xcode, while holding the option key, click Product | Run…. In the ensuing window, add NSZombieEnabled to the environment variables list.

    enter image description here

    Then run. Do the normal things you do to cause the crash and see where the debugger lands. With any luck, it will stop where the problem is actually occurring.

    When you get a EXC_BAD_ACCESS it means you’re trying to access/release something that’s already been released. If you’re in a non-ARC situation, it normally means you’ve inadvertently released something when you didn’t mean to, so just check for alloc/init and release balance. If, however, you’re in an ARC situation, I would bet it has to do with not niling a delegate when a view controller gets released.

    For example, if you have a MKMapView and have set its delegate to your view controller, you should nil its delegate when your view gets unloaded or dealloc’d. Otherwise, messages will continue to get set to it. Or, another possibility is that you’ve added your view controller as an NSNotificationCenter observer and didn’t remove it as an observer when the view controller was unloaded or dealloc’d.

    Another possibility is that you’re re-using view controllers between the two versions of your universal app. If you are accessing anything by an identifier that doesn’t exist in the nib for the iPad, that would cause a crash–though if you’re using nibs as opposed to storyboards, that may not be an issue.

    That’s about all I can think of for now. Try to zero in on where it’s happening and post code here if you still can’t figure it out.

    Best regards.

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

Sidebar

Related Questions

I have made my application universal for iPhone and iPad (window-based application; universal) from
Ive made an enterprise Universal (iphone/ipad) app that uses the odata sdk to talk
I've made a universal iPhone/iPad app (transitioned from iPhone only), but in a future
I'm working on a universal iPhone/iPad application. I'm using MonoTouch, but I can take
I have just made my app universal by combining separate iPhone and iPad projects.
iPhone/iPad dev newb here... I am using MonoTouch to create a universal iPad/iPhone storyboard
I started my Universal app coding that makes the app run on iPhone and
I just updated our app to an universal app for iPhone and iPad. I
So I made my iPhone app universal, it created a new mainWindow xib file
I have a universal iPhone/iPad app. On the main menu I have a UIImage

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.