# Config .xml Preference Orientation not working for IOS

**URL:** <https://forum.ionicframework.com/t/config-xml-preference-orientation-not-working-for-ios/6050>\
**Category:** ionic-v1\
**Created:** [June 25, 2014, 1:22am UTC](https://forum.ionicframework.com/t/config-xml-preference-orientation-not-working-for-ios/6050 "2014-06-25T01:22:00Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![djett](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/djett/32/10369_2.png) [@djett](https://forum.ionicframework.com/u/djett)\
**Post date:** [March 25, 2015, 9:56pm UTC](https://forum.ionicframework.com/t/config-xml-preference-orientation-not-working-for-ios/6050/10 "2015-03-25T21:56:09Z")

</div>

Actually I’m not sure if that’s the issue… The docs have it as capitalized and so is my implementation, however after looking into the cordova CLI library (cordova/metadata/) the ios\_parser.js file doesnt look for orientation, while android/amazon fireos/firefoxos do, so this may be a cordova bug.

In the meantime, I created a cordova hook which got published in the new version of the yeoman-ionic generator called update\_platform\_config. I also have some docs on how you can add some configuration to your config.xml which will modify your plist value…

By using the hook, you should be able to add the following to your config.xml and update the config as you would like to see it. I would only go this route if it’s a confirmed Cordova bug though.

```
<platform name="ios">
    <config-file platform="ios" target="*-Info.plist" parent="UISupportedInterfaceOrientations">
        <array>
            <string>UIInterfaceOrientationPortrait</string>
        </array>
    </config-file>

    <config-file platform="ios" target="*-Info.plist" parent="UISupportedInterfaceOrientations~ipad">
        <array>
            <string>UIInterfaceOrientationPortrait</string>
            <string>UIInterfaceOrientationLandscapeLeft</string>
            <string>UIInterfaceOrientationPortraitUpsideDown</string>
            <string>UIInterfaceOrientationLandscapeRight</string>
        </array>
    </config-file>
</platform>

```

> <https://github.com/diegonetto/generator-ionic/blob/master/templates/hooks/after_prepare/update_platform_config.js>

---

_[View the full topic](https://forum.ionicframework.com/t/config-xml-preference-orientation-not-working-for-ios/6050)._
