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

Steve Gill commented on CB-9976:
--------------------------------

Potential implementation in lib to handle this bug:

1) check if plugins/ios.json exists
2) if it exists, merge installed plugins + config munge and add to new ios.json 
(located in platforms/ios/ios.json)
3) Run _writePluginModule function from PlatformApiPoly.js to generate new 
cordova_plugins.json
4) copy plugin js files from plugins/ into platforms/ios/platform_www/plugins
5) delete plugins/ios.json

Alternative:
1) check if plugins/ios.json exists, 
2) remove installed plugins, reinstall them
This could have unintended consequences (what if you edited native plugin files 
in your project?)

2nd Alternative:
1) update PlatformAPI polyfill to use plugins/ios.json instead of 
platforms/ios/ios.json. 
2) copy plugins/ on prepare like it used to work instead of on 
install/update/rm/restore.

> Updating to cordovaLib 5.4.0 breaks ios installed plugins
> ---------------------------------------------------------
>
>                 Key: CB-9976
>                 URL: https://issues.apache.org/jira/browse/CB-9976
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CordovaLib
>            Reporter: Steve Gill
>            Assignee: Steve Gill
>
> cordova_plugins.js doesn't get created for ios when updating from an older 
> cli to a newer cli. 
> Have to remove and add plugins manually to get plugins working again.
> Reproduce (need to use npm < 3):
> npm install -g cordova@5.3.3
> cordova create helloWorld
> cd helloWorld
> cordova platform add ios
> cordova plugin add cordova-plugin-device
> cordova prepare (helloWorld/platforms/ios/www/cordova_plugins.js is created)
> npm install -g cordova@5.4.0
> cordova prepare (helloWorld/platforms/ios/www/cordova_plugins.js doesn't 
> exist)
> `helloWorld/platforms/ios/ios.json` is also incorrect in the updated version. 



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

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

Reply via email to