Question

I use the xcode 4.2 duplicate target feature to create iPad target, which also created Resources-iPad folder with all the iPad xib files.

Now I have two Targets:

  • myApp
  • myApp-iPad

two Resources:

  • Resources
  • Resources-iPad

I also set myApp project file setting:

 Targeted Device Family - iPhone/iPad

Question: When I run the app targeted to iPad simulator it uses iPhone resources files. Am I missing any settings to use the iPad resource?

Was it helpful?

Solution

enter image description hereIf I understand correctly what you did, you did not converted your target to a Universal app; rather, you created a new iPad-only version of your target.

What you want is way easier: click on your target and then use the 'Targeted Device Family' drag-down menu to choose "iPhone/iPad".

In Interface Builder you will find a corresponding command to convert the xib, but it seems that this has been already done for your when creating the iPad target.

Hope this helps.

EDIT:

If your xib file for the iPhone is called "MainWindow.xib", you should provide a xib file for the iPad named "MainWindow-iPad.xib". This way, it will be used instead of former when the app is running on an iPad device.

You should also ensure that the iPad xib is present in the "Copy Bundle Resources" section under the "Build Phases" tab of your target.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top