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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:48:32+00:00 2026-05-25T10:48:32+00:00

Here is how I made a universal app from an existing iPhone project by

  • 0

Here is how I made a universal app from an existing iPhone project by creating ~ipad.xib(s) using duplicate and then adding them back to a backup of the project, and checking universal.

I used xcode 4.02 with a base sdk of 4.3.3 with a deployment target of 3.1.2.

  1. Back up your whole project somewhere.
  2. Right click on iPhone target and choose duplicate. Choose duplicate for iPad rather than just duplicate. This makes a new folder called Resources-iPad with a subfolder called classes under that, and under that are copies of all the xib files in the entire project. (The funny thing is that when I look at these files in finder they don’t have an .xib extension although they show an extension in the xcode window – why? Finder still says they are xib files anyway though.)
  3. At this point I had two targets. This seemed wrong so I went to finder and made a backup copy of the new Resources-iPad folder, and then deleted the whole project.
  4. Copy back the original iPhone project I had backed up up in step 1.
  5. Added the Resources-iPad folder that was backed up, and edited them so they looked good for iPad.
  6. I now had one target which seemed good, and I made it a universal device instead of iPhone in the target summary.
  7. However, I got inconsistent behavior when deploying to the simulator or device – sometimes the wrong xib would be used for no apparent reason.
  8. This fixed it – in xcode, in the Resources-iPad/classes folder rename all the xibs for ipad from mynibname.xib to mynibname~ipad.xib (tilda in front and all lowercase)

I couldn’t find any documentation on whether it is OK to do it this way. It works on these physical devices so far:

iPad 2 with 4.3, iPod touch v1 with 3.1.2, iPod touch v4 (retina) with 4.1

Is this a correct way of creating a universal app? It seems easy enough now that I have this worked out, but took forever to find this info. Oh also I do not have a mainwindow.xib but other nibs that get loaded elsewhere as tableview section headers and detail views in a tabbar app – so I left the main interface sections blank.

Oh – I don’t have an iPad 1 and cant test on that device, but it doesn’t seem to work right in the iPad 3.2 Simulator, but all other devices and simulators appear to work OK.

  • 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-25T10:48:32+00:00Added an answer on May 25, 2026 at 10:48 am

    What I have seen a lot of people do is use 2 separate classes for each device. Why? Couldn’t tell you!

    What I do is use 1 class for both iPad and iPhone, only I use a macro to determine what the current device is:

    For Example

    #define IDIOM           UI_USER_INTERFACE_IDIOM()
    #define IPAD            UIUserInterfaceIdiomPad   
    
    if (IDIOM == IPAD)
    {
        /* do something specific for iPad. */
    } else {
        /* do something specific for iPhone, like set up frames. */
    }
    

    Of course, you will need to create iPad versions of your Interfaces, but that is the easy part.

    As far as identifying it as a Universal app, there is an option in your Project settings, as well as Target Device Family in build settings that you will make sure is set to iPhone/iPad.

    That is pretty much all I do to make universal apps, and is quite less time consuming as writing specific classes for each device!

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

Sidebar

Related Questions

I'm working on a universal iPhone/iPad application. I'm using MonoTouch, but I can take
I have a universal iPhone/iPad app. On the main menu I have a UIImage
Possible Duplicate: multiple upload images on c#/jquery hey guys! Yesterday i made here a
Is there someone here who made a MVC application using EXTJS 4 BETA 3?
Let me set the stage here. I'm a very junior developer who's recently made
Here is the scenario: I'm writing an app that will watch for any changes
The lackluster response here made me wonder this . I've been saddled with a
A response to a comment I made here made me stop and think: I
Comments on my answer here have made me think about how one might implement
The demo page: CLICK HERE I have made a picture to show: As clearly

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.