1

Alright, I have a problem on my hands. I'm trying to convert my project to a universal app for the iPhone and the iPad. I'm trying to make iPad-specific versions of my XIB files. As it's not possible to Create iPad version using autoresizing masks in Xcode 4, I assumed I'd just be able to pop my XIB into Xcode 3's version of IB, and let that do the magic. No dice. Here's the error I get when i try to open the XIB file in IB:

enter image description here

To be honest I don't know where to proceed from here. I guess I could just resize my views manually, but that's quite tedious and I don't really have the time to be doing that. Any ideas?

1
  • I was having trouble with XCode 4 and developing iOS apps as well. It seems like XCode4 is geared more towards Mac apps at the moment (anyone clarify)? I reverted back to XCode 3.2 for my iPhone and iPad apps.
    – Tilo Mitra
    Commented Apr 12, 2011 at 5:29

2 Answers 2

7

Alright, I figured out a rather convoluted workaround.

First of all, duplicate your original project and then select your project info. Right-click on your target, and select "Duplicate".

enter image description here

Xcode will then pop up this message. Select "Duplicate and Transition to iPad".

enter image description here

Now Xcode converts the XIB files for you, and presents you with an iPad resources folder.

enter image description here

Now open these XIB files in the Finder, and append ~ipad after the file name.

After doing so, copy these XIB files back into your original project, and then turn your project into a universal project by selecting from the dropdown in your target settings.

enter image description here

And you're done. I found that really convoluted, and I'm hoping Apple can fix this huge usability problem soon.

2
  • Sorry,but I can't see the views adjusting according to Ipad resolutions despite of following all your steps :( Commented Mar 26, 2013 at 15:58
  • I mean all those iphone nib file views are on ipad nib views Commented Mar 27, 2013 at 5:56
0

This should not happen. One way to fix this problem would be t completely remove the Xcode 4 Installation and re install it from scratch . And then re install it.

Use the following command to uninstall and re install Xcode 4

sudo [xcode-path]/Library/uninstall-devtools --mode=all

PS: If you are creating projects in Xcode 4 that you also want to open in Xcode 3 make sure you keep Document Versioning section to Interface Builder 3.1

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.