Skip to content

"Error: Variable(s) missing: URL_SCHEME" when restoring plugins on platform add #76

@andruhon

Description

@andruhon

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions