[
https://issues.apache.org/jira/browse/CB-11019?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Vladimir Kotikov updated CB-11019:
----------------------------------
Description:
When application name is changed in `config.xml`, following call to `prepare`
changes the ios project structure within {{platforms/ios}} directory. Though
some internal properties of ios platformApi are not changed and still point to
old paths. This causes the following `plugn add` call to fail.
Notice that the bug can be reproduced only if {{prepare}} and {{plugin add}}
bot h called within one node process, i.e. programmatically.
Here is a snippet that can help reproduce the problem (run {{npm install
[email protected]}} first):
{code}
var Q = require('q');
var tmp = require('tmp');
var path = require('path');
var shell = require('shelljs');
var events = require('cordova-lib').events;
var cordova = require('cordova-lib').cordova;
events.on('log', console.log).on('warn', console.warn);
var CORDOVA = path.resolve('./node_modules/cordova/bin/cordova');
// This is a repro for issue, similar to CB-10961 but it does repro even with
the
// fix for CB-10965 (https://issues.apache.org/jira/browse/CB-10965) checked in
var case2 = Q(tmp.dirSync().name)
.then(function (tempDir) {
shell.exec(CORDOVA + ' create ' + tempDir + ' com.app1 app1 -d');
shell.pushd(tempDir);
})
.then(function () {
return cordova.raw.platform('add', ['d:/cordova/cordova-ios']);
})
.then(function () {
shell.sed('-i', '<name>app1</name>', '<name>app2</name>', 'config.xml');
return cordova.raw.prepare([PLATFORM]);
})
.then(function () {
return cordova.raw.plugin('add', ['cordova-plugin-camera'], {save: true});
});
{code}
was:
When application name is changed in `config.xml`, following call to `prepare`
changes the ios project structure within {{platforms/ios}} directory. Though
some internal properties of ios platformApi are not changed and still point to
old paths. This causes the following `plugn add` call to fail.
Notice that the bug can be reproduced only if {{prepare}} and {{plugin add}}
bot h called within one node process, i.e. programmatically.
Here is a snippet that can help reproduce the problem:
{code}
var Q = require('q');
var tmp = require('tmp');
var path = require('path');
var shell = require('shelljs');
var events = require('cordova-lib').events;
var cordova = require('cordova-lib').cordova;
events.on('log', console.log).on('warn', console.warn);
var CORDOVA = path.resolve('./node_modules/cordova/bin/cordova');
// This is a repro for issue, similar to CB-10961 but it does repro even with
the
// fix for CB-10965 (https://issues.apache.org/jira/browse/CB-10965) checked in
var case2 = Q(tmp.dirSync().name)
.then(function (tempDir) {
shell.exec(CORDOVA + ' create ' + tempDir + ' com.app1 app1 -d');
shell.pushd(tempDir);
})
.then(function () {
return cordova.raw.platform('add', ['d:/cordova/cordova-ios']);
})
.then(function () {
shell.sed('-i', '<name>app1</name>', '<name>app2</name>', 'config.xml');
return cordova.raw.prepare([PLATFORM]);
})
.then(function () {
return cordova.raw.plugin('add', ['cordova-plugin-camera'], {save: true});
});
{code}
> Cordova ios handles project rename incorrectly
> ----------------------------------------------
>
> Key: CB-11019
> URL: https://issues.apache.org/jira/browse/CB-11019
> Project: Apache Cordova
> Issue Type: Bug
> Components: iOS
> Affects Versions: 4.1.0
> Reporter: Vladimir Kotikov
> Assignee: Vladimir Kotikov
> Labels: ios, prepare
> Fix For: 4.1.2
>
>
> When application name is changed in `config.xml`, following call to `prepare`
> changes the ios project structure within {{platforms/ios}} directory. Though
> some internal properties of ios platformApi are not changed and still point
> to old paths. This causes the following `plugn add` call to fail.
> Notice that the bug can be reproduced only if {{prepare}} and {{plugin add}}
> bot h called within one node process, i.e. programmatically.
> Here is a snippet that can help reproduce the problem (run {{npm install
> [email protected]}} first):
> {code}
> var Q = require('q');
> var tmp = require('tmp');
> var path = require('path');
> var shell = require('shelljs');
> var events = require('cordova-lib').events;
> var cordova = require('cordova-lib').cordova;
> events.on('log', console.log).on('warn', console.warn);
> var CORDOVA = path.resolve('./node_modules/cordova/bin/cordova');
> // This is a repro for issue, similar to CB-10961 but it does repro even with
> the
> // fix for CB-10965 (https://issues.apache.org/jira/browse/CB-10965) checked
> in
> var case2 = Q(tmp.dirSync().name)
> .then(function (tempDir) {
> shell.exec(CORDOVA + ' create ' + tempDir + ' com.app1 app1 -d');
> shell.pushd(tempDir);
> })
> .then(function () {
> return cordova.raw.platform('add', ['d:/cordova/cordova-ios']);
> })
> .then(function () {
> shell.sed('-i', '<name>app1</name>', '<name>app2</name>', 'config.xml');
> return cordova.raw.prepare([PLATFORM]);
> })
> .then(function () {
> return cordova.raw.plugin('add', ['cordova-plugin-camera'], {save: true});
> });
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]