Device Rotation

For anyone interested I found the solution for myself. I am using the most current version of cordova (5.4.0), and the documentation for that version suggests this setting in config.xml to support rotation:

<platform name="ios"> <preference name="Orientation" value="all" /> </platform>

I found that following the documentation for cordova (5.0.0) contained the config.xml settings that ended up working for me:

<preference name="Orientation" value="default" />

in addition to this global function being present:

`/**

  • @param {Number} degree - UIInterfaceOrientationPortrait: 0, UIInterfaceOrientationLandscapeRight: 90, UIInterfaceOrientationLandscapeLeft: -90, UIInterfaceOrientationPortraitUpsideDown: 180
  • @returns {Boolean} Indicating if rotation should be allowed.
    */
    function shouldRotateToOrientation(degrees) {
    return true;
    }`

Just absolutely silly if you ask me, I would prefer the solution suggested in the cordova 5.4.0 documentation compared to this. But I guess whatever works!