3

Convert iPad application to iPhone- Universal app.

I already have one iPad application, now I want to make a universal app of that iPad application.

How to convert? Is it possible? Or do I have to start a new app?

Sam Spencer
  • 8,492
  • 12
  • 76
  • 133
Rakesh Bhatt
  • 4,606
  • 3
  • 25
  • 38
  • It will not convert it self. :) You need to start development. Grab the code/project of iPad application, study it. Implement it according to iPhone design... – sagarkothari Sep 09 '10 at 11:16
  • 4
    possible duplicate of [iPad to iPhone?](http://stackoverflow.com/questions/3058459/ipad-to-iphone) – Brad Larson Sep 09 '10 at 15:13

1 Answers1

4

Open up your project in Interface Builder. Click on the disclosure triangle next to "Targets", then right-click on the target and choose "Upgrade Current Target for iPad...".

Then read the iPad Programming Guide, especially the section Starting Your Project.

Edit:

I see now -- iPad to iPad/iPhone.

I think you would do something like the following:

  1. Create a .xib for the iPhone for the Main Window/App Delegate/etc, to corresspond your existing .xib for iPad.
  2. Add an entry in your info plist: NSMainNibFile, with the value of the name of your new iPhone xib
  3. Go to your build settings and set the Base SDK to 4.1 (or 4.0 if you still have the older SDK installed)
  4. Keep your iOS Deployment Target build setting at 3.2 if you're only worried about iPhones and iPod Touches with 4.x.
  5. Set the Targeted Device Family build setting to iPhone/iPad
  6. Start refactoring your code to create two different code paths, one for iPhone and one for iPad, where appropriate.
Shaggy Frog
  • 27,575
  • 16
  • 91
  • 128
  • Actually, it's about iPad to iPad/iPhone. But I misread it, too; I just saw the Universal App bit. – Shaggy Frog Sep 10 '10 at 08:34
  • Ah, right. Please consider voting to close as duplicate too and if it gets closed flag for moderator attention to merge this answer into the duplicate (sadly there are currently just link-only answers). – Georg Fritzsche Sep 10 '10 at 08:51