I have a universal app and want only portrait orientation for iPhone and landscape for iPad. I don't believe I can just do,
<preference name="Orientation" value="landscape" />
because I can't see how it would differentiate between phone and tablet. Currently I've got this in the root:
...
<platform name="ios">
<config-file target="foo-Info.plist" platform="ios" parent="UISupportedInterfaceOrientations">
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
</array>
</config-file>
<config-file target="foo-Info.plist" platform="ios" parent="UISupportedInterfaceOrientations~ipad">
<array>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</config-file>
...
</platform>
...
- Why doesn't this update my app's foo-Info.plist? I have tried
cordova build ios
and I have triedcordova prepare
commands, neither update the plist file. - When should these changes take effect? When I add the ios platform? when I do
cordova build ios
? - I also need this to work for Android phone and tablets if you know how.