You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Shazron Abdullah (JIRA)" <ji...@apache.org> on 2016/03/16 07:38:33 UTC

[jira] [Comment Edited] (CB-10694) Platform-specific configuration preferences don't override global settings

    [ https://issues.apache.org/jira/browse/CB-10694?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15196798#comment-15196798 ] 

Shazron Abdullah edited comment on CB-10694 at 3/16/16 6:38 AM:
----------------------------------------------------------------

The problem here is in the config.xml merging, it adds duplicate entries.

For example, this in the root config.xml:
{code}
    <preference name="Orientation" value="default" />
    <platform name="ios">
        <preference name="Orientation" value="all" />
    </platform>
{code}

.. is translated to the platform config.xml:
{code}
    <preference name="Orientation" value="all" />
    <preference name="Orientation" value="default" />
{code}
... which is now a global preference in the platform config.xml, thus showing the result we saw in the previous comment for case #3.



was (Author: shazron):
The problem here is in the config.xml munging, it adds duplicate entries.

For example, this in the root config.xml:
{code}
    <preference name="Orientation" value="default" />
    <platform name="ios">
        <preference name="Orientation" value="all" />
    </platform>
{code}

.. is translated to the platform config.xml:
{code}
    <preference name="Orientation" value="all" />
    <preference name="Orientation" value="default" />
{code}
... which is now a global preference in the platform config.xml, thus showing the result we saw in the previous comment for case #3.


> Platform-specific configuration preferences don't override global settings
> --------------------------------------------------------------------------
>
>                 Key: CB-10694
>                 URL: https://issues.apache.org/jira/browse/CB-10694
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 6.0.0, 5.4.1
>            Reporter: Dan Polivy
>            Assignee: Shazron Abdullah
>            Priority: Minor
>              Labels: cordova-ios-4.1.1, triaged
>
> In the following scenario, the platform-specific orientation value is not taking preference as I would expect:
> {{global: default, ios: all --> no plist entries}}
> In this scenario, both the global and the platform specific preference setting get copied to the platform's config.xml, and the 'default' wins out. Is it a supported scenario to "override" a global preference with a platform specific setting?
> I am testing with cordova@6.0.0.
> This is related to https://issues.apache.org/jira/browse/CB-9975 and https://issues.apache.org/jira/browse/CB-8783



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org