You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Adam George (JIRA)" <ji...@apache.org> on 2013/11/27 04:35:38 UTC

[jira] [Comment Edited] (CB-5495) Running `cordova build` a 2nd time regenerates config.xml with the installed plugins missing (ios only)

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

Adam George edited comment on CB-5495 at 11/27/13 3:35 AM:
-----------------------------------------------------------

To work around this, I can add my plugins into the 'global' config.xml - i.e. www/config.xml.

    <feature name="Console">
        <param name="ios-package" value="CDVLogger" />
    </feature>
    <feature name="Device">
        <param name="ios-package" value="CDVDevice" />
    </feature>
    <feature name="Notification">
        <param name="ios-package" value="CDVNotification" />
    </feature>
    <feature name="Globalization">
        <param name="ios-package" value="CDVGlobalization" />
    </feature>
    <feature name="NetworkStatus">
        <param name="ios-package" value="CDVConnection" />
    </feature>
    <feature name="SplashScreen">
        <param name="ios-package" value="CDVSplashScreen" />
        <param name="onload" value="true" />
    </feature>
    <feature name="IDBlue">
        <param name="ios-package" value="SageIDBlue" />
        <param name="onload" value="true" />
    </feature>
    <feature name="BarcodeScanner">
        <param name="ios-package" value="CDVBarcodeScanner" />
    </feature>

But then it adds these ios-specific tags into the android config.xml as well as the ios one, which is not cool.


was (Author: asgeo1):
To work around this, I can add my plugins into the 'global' config.xml - i.e. www/config.xml.

    <feature name="Console">
        <param name="ios-package" value="CDVLogger" />
    </feature>
    <feature name="Device">
        <param name="ios-package" value="CDVDevice" />
    </feature>
    <feature name="Notification">
        <param name="ios-package" value="CDVNotification" />
    </feature>
    <feature name="Globalization">
        <param name="ios-package" value="CDVGlobalization" />
    </feature>
    <feature name="NetworkStatus">
        <param name="ios-package" value="CDVConnection" />
    </feature>
    <feature name="SplashScreen">
        <param name="ios-package" value="CDVSplashScreen" />
        <param name="onload" value="true" />
    </feature>
    <feature name="IDBlue">
        <param name="ios-package" value="SageIDBlue" />
        <param name="onload" value="true" />
    </feature>
    <feature name="BarcodeScanner">
        <param name="ios-package" value="CDVBarcodeScanner" />
    </feature>

But then it adds these ios-specific tags into the android config.xml after `cordova build` is ran, which is not cool.

> Running `cordova build` a 2nd time regenerates config.xml with the installed plugins missing (ios only)
> -------------------------------------------------------------------------------------------------------
>
>                 Key: CB-5495
>                 URL: https://issues.apache.org/jira/browse/CB-5495
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CLI
>    Affects Versions: 3.2.0
>            Reporter: Adam George
>
> When running `cordova build`, it incorrectly generates the config.xml, such that my plugins are not listed and therefor won't work.
> (BTW, I'm talking about the config.xml in platforms/ios/myproject/config.xml  - not platforms/ios/www/config.xml    - NB - can't these have different names? It's too confusing).
> It only does this in certain situations. Let me try an explain:
> I have installed several cordova plugins into my CLI project. i.e.
> →  cordova git:(master) × cordova plugin list
> [ 'com.phonegap.plugins.barcodescanner',
>   'com.sagetechnology.plugins.idblue',
>   'org.apache.cordova.console',
>   'org.apache.cordova.device',
>   'org.apache.cordova.dialogs',
>   'org.apache.cordova.globalization',
>   'org.apache.cordova.network-information',
>   'org.apache.cordova.splashscreen' ]
> If I then add the ios platform, it will correctly generate the iOS project with a correct config.xml.
> If I then run `cordova build`, everything is still OK.
> However, if I then immediately run `cordova build` a 2nd time, it stuffs up the config.xml file, and regenerates it with my installed plugins missing.
> It only started doing this after I updated to Cordova 3.2.0.



--
This message was sent by Atlassian JIRA
(v6.1#6144)