"Error: Variable(s) missing: URL_SCHEME" when restoring plugins on platform add
andruhon opened this issue · 4 comments
cordova-cli 4.3.0
android-platform 3.7.1
When you do
cordova plugin add https://github.com/EddyVerbruggen/LaunchMyApp-PhoneGap-Plugin.git --variable URL_SCHEME=mycoolapp --save
It for some reason saves URL_SCHEME as <param name="URL_SCHEME" value="slingshotapp" />
And later if you try to update or add a platform you'll get an error like this:
Error: Variable(s) missing: URL_SCHEME
The URL_SCHEME variable should be saved as variable, not as param, here's an example:
<feature name="Custom URL scheme">
<param name="id" value="nl.x-services.plugins.launchmyapp" />
<param name="url" value="https://github.com/EddyVerbruggen/LaunchMyApp-PhoneGap-Plugin.git" />
<variable name="URL_SCHEME" value="mycoolapp" />
</feature>
I think it is something worth to document in README
I noticed the same issue today. As it had an error it was causing other issues with plugins. quick fix for me was to remove your plugin first then remove platform (I was doing a rebuild to get something working so needed to remove) and then re add platform. This loaded all of the other plugins correctly then I added back in yours with the --variable. worked fine that way.
@andruhon This sounds like a Plugman issue to me. I will add it to the readme, thanks for the PR!
+1