Lock down orientation for iPad / iPhone

I’m wondering if it is possible to lock down different types of orientation for iPad/iPhone in the same build.
We want the player to experience the game in portrait mode on the iPhone but landscape mode on the iPad. This should of course need to work with the same build.

Would this even be possible?

I don’t know about Defold built in functions. This is for sure possible to do natively. Maybe extension system would allow the use of native functions which enable it. Or it could be added to the window module. Like window.lock_orientation(window.ORIENTATION_PORTRAIT)

NSNumber *value = [NSNumber numberWithInt:UIInterfaceOrientationLandscapeLeft];
[[UIDevice currentDevice] setValue:value forKey:@"orientation"];

Does sys.get_sys_info know how to detect iPads vs iPhones? If not you could also do it based on resolution. There are only a small number of possible resolutions, and then could set portrait or landscape orientation lock depending.

You can lock orientation in Info.plist for specific devices.
UISupportedInterfaceOrientations
Creating Platform- and Device-Specific Keys