[
https://issues.apache.org/jira/browse/CB-12582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15934802#comment-15934802
]
Kyle Kirbatski edited comment on CB-12582 at 3/21/17 4:09 PM:
--------------------------------------------------------------
It's unfortunately not that easy since Cordova will install the plugins in the
order that {{fs.readdirSync}} returns. Modify the function {{findPlugins}}
inside of {{cordova-lib/src/cordova/util.js}} to:
{code:js}
function findPlugins(pluginPath) {
var plugins = [],
stats;
if (exports.existsSync(pluginPath)) {
plugins = fs.readdirSync(pluginPath).filter(function (fileName) {
stats = fs.statSync(path.join(pluginPath, fileName));
return fileName != '.svn' && fileName != 'CVS' &&
stats.isDirectory();
}).sort(function (fileName) {
if(fileName.indexOf('urbanairship') >= 0){
return -1;
}
else {
return 1;
}
});
}
return plugins;
}
{code}
This will ensure that the urban airship plugin will always be installed first.
After making that change, re-run your test case.
was (Author: kkirbatski):
It's unfortunately not that easy since Cordova will install the plugins in the
order that `fs.readdirSync` returns. Modify the function `findPlugins` inside
of cordova-lib/src/cordova/util.js to:
{code}
function findPlugins(pluginPath) {
var plugins = [],
stats;
if (exports.existsSync(pluginPath)) {
plugins = fs.readdirSync(pluginPath).filter(function (fileName)
{
stats = fs.statSync(path.join(pluginPath, fileName));
return fileName != '.svn' && fileName != 'CVS' &&
stats.isDirectory();
}).sort(function (fileName) {
if(fileName.indexOf('urbanairship') >= 0){
return -1;
}
else {
return 1;
}
});
}
return plugins;
}
{code}
This will ensure that the urban airship plugin will always be installed first.
After making that change, re-run your test case.
> Plugin's Cocoapods don't persist if another plugin is added after it
> --------------------------------------------------------------------
>
> Key: CB-12582
> URL: https://issues.apache.org/jira/browse/CB-12582
> Project: Apache Cordova
> Issue Type: Bug
> Components: iOS
> Affects Versions: [email protected], 6.5.0
> Reporter: Kyle Kirbatski
> Priority: Blocker
> Fix For: [email protected]
>
>
> I was trying to use the urbanairship-cordova plugin but was unable to because
> the frameworks added by Cocoapods (referenced from the plugin's xml) were not
> being found for linking. After some investigation it appears that if a plugin
> is added after a plugin that uses cocoapods then the changes made by
> cocoapods are removed by cordova.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]