Sim Bhattacharya
Sim Bhattacharya

Reputation: 53

Xcode 8.1 setting for deployment devices

How do I set my app for both iphone and ipad using xcode 8.1?

When I go to Targets -> General -> Deployment Info -> Devices and select Universal, I again get a tab below as iphone and ipad. Does that mean a single build will not generate an app that is compatible for both ipad and iphone?

If I select the deployment device as only iphone, then the app when loaded on the ipad is not full screen and has a black border. How can I build an app that is full screen on both ipad and iphone ?

Upvotes: 5

Views: 1294

Answers (1)

Milan
Milan

Reputation: 152

In order to make an application work in both iPhone & iPad then need to follow below steps.

*Before create an project please select universal in device section. *

  • In application: didFinishLaunchingWithOptions: put a condition to check the device. If the device is iPad then load the iPad screen and if the device is iPhone then load the iPhone screen. Make sure follow the MVC pattern, So that it is easy to populate the data in both the screens. In application: didFinishLaunchingWithOptions: put a condition to check the device. If the device is iPad then load the iPad screen and if the device is iPhone then load the iPhone screen. Make sure follow the MVC pattern, So that it is easy to populate the data in both the screens.

Upvotes: 1

Related Questions