How can I upgrade an iPhone app to iPad app in xcode 4.2?

274 Views Asked by At

I have upgraded my iPhone app to universal by right right clicking the project target and selecting duplicate option. Then there was 2 choices-duplicate only and 'duplicate and transition to iPad'. I choose second one. Then a group of iPad XIB files(having same name as iPhone XIBs) called Resources_iPad is automatically added to the app. But still when I choose iPad simulator to run the project, the app chooses only iphone XIBs. Can anyone help me to resolve this problem?

2

There are 2 best solutions below

6
On

go to target (or project) settings and check if Targeted Device Family set to iPhone/iPad

2
On

Any XIBs loaded in code will still load the iPhone version. You should use UIUserInterfaceIdiom() to determine which XIB to load. Also make sure you have correctly set your iPad interface file in Info.plist if you specify your iPhone one there.