cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-10961) CLI 6.1.0 Error when adding ios platform and plugin declare in config.xml
Date Sat, 26 Mar 2016 21:59:25 GMT

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

ASF GitHub Bot commented on CB-10961:
-------------------------------------

Github user csantanapr commented on the pull request:

    https://github.com/apache/cordova-lib/pull/416#issuecomment-201937380
  
    @vladimir-kotikov  yes lets fix this in cordova-lib to get a fix in CLI 6.1.1, but I agree
with you that problem should also be fix in iOS 
    
    The root of the problem is the merge of XML the <name> value from project config.xml
doesn't overwrite the <name> in default platform config.xml <name> I open the
JIRA [CB-10965](https://issues.apache.org/jira/browse/CB-10965)
    The real problem is cordova-common merge util where i think the tag name should be single
instance in result of merge https://github.com/apache/cordova-lib/blob/master/cordova-common/src/util/xml-helpers.js#L197
    similar as author and description.
    it will require a cordova-common release, then an iOS to pick up the change. But I think
fixing in CLI 6.1.1  is required to not brake other ios platforms versions that don't have
this fix 



> CLI 6.1.0 Error when adding ios platform and plugin declare in config.xml
> -------------------------------------------------------------------------
>
>                 Key: CB-10961
>                 URL: https://issues.apache.org/jira/browse/CB-10961
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CLI
>    Affects Versions: 6.1.0
>            Reporter: Carlos Santana
>            Priority: Critical
>              Labels: cli, ios, regresion
>
> New CLI 6.1.0 has a regression when adding platform ios, not using HelloCordova name
for the app and plugins are present or declare in config.xml
> To reproduce there are multiple use cases:
> 1. Create new app with name app1, add a plugin then add ios platform
> 2, Create new app with a template with a plugin in config.xml and that specifies a name
app1 in config.xml or create cli, then add ios platform
> 3. Create new app with name app1 add a plugin declaration in config.xml globally or under
ios platform and then add ios platform
> Initial investigation is that ios xcode project is always created with HelloCordova and
the name specified in config.xml
> $ cordova create app1 com.app1 app1
> Creating a new cordova project.
> ~/dev/cordova/cli-6.1.0
> 🍔  $ cd app1/
> ~/dev/cordova/cli-6.1.0/app1
> 🍔  $ cordova plugin add cordova-plugin-camera --save
> Fetching plugin "cordova-plugin-camera" via npm
> Saved plugin info for "cordova-plugin-camera" to config.xml
> ~/dev/cordova/cli-6.1.0/app1
> 🍔  $ cat config.xml
> <?xml version='1.0' encoding='utf-8'?>
> <widget id="com.app1" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
>     <name>app1</name>
>     <description>
>         A sample Apache Cordova application that responds to the deviceready event.
>     </description>
>     <author email="dev@cordova.apache.org" href="http://cordova.io">
>         Apache Cordova Team
>     </author>
>     <content src="index.html" />
>     <plugin name="cordova-plugin-whitelist" spec="1" />
>     <access origin="*" />
>     <allow-intent href="http://*/*" />
>     <allow-intent href="https://*/*" />
>     <allow-intent href="tel:*" />
>     <allow-intent href="sms:*" />
>     <allow-intent href="mailto:*" />
>     <allow-intent href="geo:*" />
>     <platform name="android">
>         <allow-intent href="market:*" />
>     </platform>
>     <platform name="ios">
>         <allow-intent href="itms:*" />
>         <allow-intent href="itms-apps:*" />
>     </platform>
>     <plugin name="cordova-plugin-camera" spec="~2.1.1" />
> </widget>
> ~/dev/cordova/cli-6.1.0/app1
> 🍔  $ cordova platform add ios
> Adding ios project...
> iOS project created with cordova-ios@4.1.0
> Installing "cordova-plugin-camera" for ios
> Discovered plugin "cordova-plugin-whitelist" in config.xml. Installing to the project
> Fetching plugin "cordova-plugin-whitelist@1" via npm
> Installing "cordova-plugin-whitelist" for ios
> Failed to install 'cordova-plugin-whitelist':Error: ENOENT: no such file or directory,
open '/Users/csantana23/Documents/dev/cordova/cli-6.1.0/app1/platforms/ios/app1.xcodeproj/project.pbxproj'
>     at Error (native)
>     at Object.fs.openSync (fs.js:584:18)
>     at Object.fs.writeFileSync (fs.js:1224:33)
>     at Object.cachedProjectFiles.(anonymous function).write (/Users/csantana23/Documents/dev/cordova/cli-6.1.0/app1/platforms/ios/cordova/lib/projectFile.js:73:16)
>     at /Users/csantana23/Documents/dev/cordova/cli-6.1.0/app1/platforms/ios/cordova/lib/plugman/Plugman.js:85:21
>     at _fulfilled (/Users/csantana23/Documents/dev/cordova/cli-6.1.0/app1/platforms/ios/cordova/node_modules/q/q.js:834:54)
>     at self.promiseDispatch.done (/Users/csantana23/Documents/dev/cordova/cli-6.1.0/app1/platforms/ios/cordova/node_modules/q/q.js:863:30)
>     at Promise.promise.promiseDispatch (/Users/csantana23/Documents/dev/cordova/cli-6.1.0/app1/platforms/ios/cordova/node_modules/q/q.js:796:13)
>     at /Users/csantana23/Documents/dev/cordova/cli-6.1.0/app1/platforms/ios/cordova/node_modules/q/q.js:857:14
>     at runSingle (/Users/csantana23/Documents/dev/cordova/cli-6.1.0/app1/platforms/ios/cordova/node_modules/q/q.js:137:13)
> ~/dev/cordova/cli-6.1.0/app1



--
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


Mime
View raw message