Universal App settings.config

Is there a way to limit orientation per device on a universal app?

I only want iphones to be in portrait mode and ipads to be in landscape mode.

I can’t find much documentation on build.settings like

UIInterfaceOrientation~ipad

and

UISupportedInterfaceOrientations~ipad

Use getInfo for model:

https://docs.coronalabs.com/api/library/system/getInfo.html#model

I’m pretty sure that doesn’t work for settings.config.

But since you suggest using getInfo, do you know a way to lock the UI at runtime to a desired orientation? It would be nice if position 0,0 always is in the upper left corner both for portrait and landscape mode, so the interface would be drawn the same plus a few changes.

Very good point, I commented without reading thoroughly.

if you’re only targeting iPhones and iPads, you can just release one app for iPhones and one app for iPads. I don’t know if it’s even possible to have one codebase that serves two different orientations. I’m not an expert on dual orientation support, but I’d venture to guess it’s either not possible, or prohibitively difficult to manage. 

Use getInfo for model:

https://docs.coronalabs.com/api/library/system/getInfo.html#model

I’m pretty sure that doesn’t work for settings.config.

But since you suggest using getInfo, do you know a way to lock the UI at runtime to a desired orientation? It would be nice if position 0,0 always is in the upper left corner both for portrait and landscape mode, so the interface would be drawn the same plus a few changes.

Very good point, I commented without reading thoroughly.

if you’re only targeting iPhones and iPads, you can just release one app for iPhones and one app for iPads. I don’t know if it’s even possible to have one codebase that serves two different orientations. I’m not an expert on dual orientation support, but I’d venture to guess it’s either not possible, or prohibitively difficult to manage.