Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 ?

like image 570
Sim Bhattacharya Avatar asked Nov 07 '22 23:11

Sim Bhattacharya


1 Answers

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.
like image 179
Milan Avatar answered Nov 15 '22 07:11

Milan