cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From MMrko <>
Subject [GitHub] cordova-lib pull request: CB-8043 CB-6462 CB-6105 Refactor orienta...
Date Fri, 05 Dec 2014 01:28:57 GMT
GitHub user MMrko opened a pull request:

    CB-8043 CB-6462 CB-6105 Refactor orientation preference support

    Fixes [CB-8043](, [CB-6462](
and [CB-6105]( Touches [CB-6182](
    Adds support for the global & platform-specific orientation preference (iOS, WP8 and
Firefox). Android and Amazon Fire OS already had this functionality. Additionally, platform-specific
orientation preference now accepts user-defined values (e.g. `reverseLandscape` for Android
or `UIInterfaceOrientationPortraitUpsideDown` for iOS). If need be I'd be happy to update
the [docs](
    Both iOS and WP8 APIs allow the developer to define an initial orientation as well as
a set of supported orientations. For now, the platform-specific parsers for iOS and WP8 keep
it simple and don't support defining the supported orientations (see [ios_parser.js](/MMrko/cordova-lib/tree/fix-orientation-pref/cordova-lib/src/cordova/metadata/ios_parser.js#L78-L102)
& [wp8_parser.js](/MMrko/cordova-lib/tree/fix-orientation-pref/cordova-lib/src/cordova/metadata/wp8_parser.js#L62-L84)).
As a future improvement the orientation preference could/should offer such granularity. Meanwhile,
developers can resort to a custom approach in their builds.
    To help keep the code maintainable I added a [cordova-lib/src/configparser/supportedPreferences.json](/MMrko/cordova-lib/tree/fix-orientation-pref/cordova-lib/src/configparser/supportedPreferences.json)
that lists the supported preferences and their values for each platform. Maintainer input
would be appreciated on this since I wonder if the approach I took here is OK. Nevertheless,
a central config for preferences seems necessary.
    Tested on OS X Mavericks & Windows 8 running VS 2013.

You can merge this pull request into a Git repository by running:

    $ git pull fix-orientation-pref

Alternatively you can review and apply these changes as the patch at:

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #128
commit 3ab3c824fe2b67fede6bf75fa1731599152f3090
Author: Marko Raatikka <>
Date:   2014-12-02T23:04:59Z

    CB-8043 CB-6462 CB-6105 Refactor orientation preference support (adds iOS, WP8 & Firefox


If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message