iPad Landscape Enabler

If you want landscape and portrait enabled on iPad, but only portrait on iPhone/iPod, then you've come to the right place. Add this plugin and set orientation to portrait, this plugin will add landscape orientation for iPad only.
EddyVerbruggen3.01
platforms: ios
$ cordova plugin add nl.x-services.plugins.ipadlandscapeenabler

iPad Landscape Enabler

by Eddy Verbruggen, for PhoneGap >= 3.0.0 (check here for PhoneGap < 3.0.0).

@deprecated since 28/01/2014: PhoneGap Build now allows fine-grained control of your iOS device orientation via the config.xml. See this issue for details. Here's an example of a config.xml which achieves the exact same thing as this plugin does (see the aforementioned link for another example):

  <!-- use portrait mode for all devices.. -->
  <preference name="orientation" value="portrait" />
  <!-- .. but override iPad orientation to allow landscape as well (set overwrite="true" to allow only landscape) -->
  <gap:config-file platform="ios" parent="UISupportedInterfaceOrientations~ipad" overwrite="false">
    <array>
      <string>UIInterfaceOrientationLandscapeLeft</string>
      <string>UIInterfaceOrientationLandscapeRight</string>
    </array>
  </gap:config-file>
  1. Description
  2. Installation
  3. License

1. Description

If you are using PhoneGap Build and want landscape and portrait enabled on iPad, but only portrait on iPhone/iPod, then you've come to the right place. Add this plugin and set orientation to portrait, this plugin will add landscape orientation for iPad only.

2. Installation

The only thing you need to do is editing your www/config.xml. Add this line:

<gap:plugin name="nl.x-services.plugins.ipadlandscapeenabler" />

or to use this exact version:

<gap:plugin name="nl.x-services.plugins.ipadlandscapeenabler" version="3.0" />

And while you are editing the www/config.xml, make sure you set the orientation preference to portrait:

<preference name="orientation" value="portrait" />

This makes sure all devices will have portrait mode only, but for iPad landscape is added by this plugin.

3. License

The MIT License (MIT)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.