Open wizlonuk opened 7 years ago
Just add to you config.xml the following lines, works for me:
<vs:plugin name="cordova-plugin-customurlscheme"> <param name="URL_SCHEME" value="YOUROWNSCHEME" /> </vs:plugin>
I can't get it to install either.
I can't get it to install either
Same here... is there any fix for that available ow what did you all do to get it working?
Perhaps it's related to the unbound 'uap' prefix. I've added the namespace import to the plugin.xml - can you try installing from GitHub?
Hi Eddy, thanks for having a look into this. I just tried it with Visual Studio and the GitHub branch, but there still seems to be a problem, but I am quite sure the uap-prefix-addition is very likely a good idea. Do you have any other idea, what could be happening there?
Okay, the problem is the line 102 and 104 in the file plugin.xml.
If I change this:
<uap:Extension Category="windows.protocol">
<uap:Protocol Name="$URL_SCHEME" />
</uap:Extension>
To this:
<Extension Category="windows.protocol">
<uap:Protocol Name="$URL_SCHEME" />
</Extension>
Now Visual Studio can analyse the Plugin.xml again. :) I'll test if everything is working then tomorrow.
Best regards Fuchur
Awesome, looking forward to your follow up!
Okay, got it working with this. Just replace the -part in plugin.xml with:
<!-- windows -->
<platform name="windows">
<config-file target="package.windows.appxmanifest" parent="/Package/Applications/Application/Extensions">
<Extension Category="windows.protocol" StartPage="www/index.html">
<Protocol Name="$URL_SCHEME" />
</Extension>
</config-file>
<config-file target="package.windows80.appxmanifest" parent="/Package/Applications/Application/Extensions">
<Extension Category="windows.protocol" StartPage="www/index.html">
<Protocol Name="$URL_SCHEME" />
</Extension>
</config-file>
<config-file target="package.phone.appxmanifest" parent="/Package/Applications/Application/Extensions">
<Extension Category="windows.protocol" StartPage="www/index.html">
<Protocol Name="$URL_SCHEME" />
</Extension>
</config-file>
<js-module src="www/windows/LaunchMyApp.js" name="LaunchMyApp">
<clobbers target="window.plugins.launchmyapp" />
</js-module>
</platform>
Thanks again for this great plugin :).
Best regards Fuchur
PS: Leave windows 8 and wp8 as it is. That should be fine. PPS: Of cause this only works, if the page to handle the url should be "www/index.html" (which is most often the case). Otherwise it would need to be replaced. Maybe you could implement an additional variable for that with the info, that in general it is "www/index.html".
Hey @Fuchur84, thanks for the suggestion! As I'm not using the Windows platform I can't test this, but I have swapped the config for yours (also, the hook has been removed from the config, I think that's what you intended to do).
Would be great if a few folks can give the current GitHub master a try - I'll leave this open until then.
I'm attempting to install the plugin by opening the config.xml, selecting Plugins, the Custom tab and entering both the PluginID (cordova-plugin-customurlscheme) or the Git repo URL (https://github.com/EddyVerbruggen/Custom-URL-scheme), however I am getting the following error:
"Visual Studio was unable to parse plugin.xml. Please ensure plugin.xml exists and contains no errors."
I've previously had no problems installing via visual studio, through a plugin Id or Git, is this a genuine issue, or is this not supported?
Thank you