Search code examples
iosxcodeipadautolayoutstoryboard

How to convert my iOS App from iPhone to universal in Xcode 7 or later?


I have searching questions for my query and I got similar questions, but with older versions of Xcode.

Is there any new things available in latest version of Xcode that can make it easy to make iPhone developed project to Universal ?

Second thing, I have used storyboard, will I have to make separate storyboard file for iPad version ? I have used Autolayout, so will I have to forget about care for frames of views in case of iPad ?

Better, someone give me steps to the migration.


Solution

  • First of all if you want to use separate design for iPad and iPhone, in that case you need to create separate storyboards for iPhone and iPad.

    Well If you want to use same design for both devices then you can skip step (2), and in step(3) you need to mention same storyboard name the one you used for iPhone.

    I assume you are using different design for both devices, so steps are following.

    1) Make your application universal by selecting universal in Devices under Deployment Info.
    enter image description here

    2) Add new storyboard for iPad by pressing following combination of keys.

    Command + N

    enter image description here

    3) Add name of storyboard for iPad in Info.plist
    click "+" button and add following

    key :Main storyboard file base name (iPad)  Type: String Value: iPad Storyboard Name
    

    After all above steps your are done with basic steps needed to perform for converting app into universal app.