iOS build puts phonegap-plugin-push copy in platform/ios/www/lib


For some reason, every time I run “ionic build ios”, the plugin folder for “phonegap-plugin-push” is copied to platform/ios/www/lib. I’m not even sure this is restricted to iOS builds because I see it as well in www/lib. Unfortunately, I have to delete this folder every time I try to archive and upload a build to iTunes Connect because of a bundle issue, exactly as described here: So it appears this issue has been observed before. Any reason why this particular plugin is copied to the lib folder?

In my package.json, I have the plugin added like this:

"cordovaPlugins": [ "cordova-plugin-device", "cordova-plugin-console", "cordova-plugin-whitelist", "cordova-plugin-splashscreen", "ionic-plugin-keyboard", { "locator": "", "id": "cordova-plugin-x-toast" }, { "locator": "", "id": "cordova-plugin-file-opener2" }, { "variables": { "SENDER_ID": "99999999" }, "locator": "phonegap-plugin-push", "id": "phonegap-plugin-push" }, "cordova-plugin-file-transfer", "cordova-plugin-file", "cordova-plugin-inappbrowser", "cordova-plugin-secure-storage" ]

In my config.xml, the plugin is there as the following:

<plugin name="phonegap-plugin-push" spec="~1.8.1"> <variable name="SENDER_ID" value="1234567" /> </plugin>


Figured it out. Had the plugin listed under my “devDependencies” in bower.json. That caused it to get copied to “www/lib”. Removed it and ran bower prune