Search code examples
cordovawebrtccordova-pluginsvisual-studio-cordovaphonertc

PhoneRTC Cordova Plugin Won't Install in Visual Studio Cordova Projects


In both Visual Studio 2013 and Visual Studio 2015 Preview when trying to add the custom plugin PhoneRTC by inputting the .git URL the loading bar keeps going on forever. Adding plugins in VS is done by right clicking config.xml then View Designer -> Plugins. I also tried installing the cordova opentok plugin the same way and it caused VS to crash; however, I have successfully installed other plugins from github.

I'm not sure what causes these problems but it isn't possible to manually add the plugins. I've tried from the Windows command line and methods related to similar (But not the same) issues people have had with no success.

It's hard to say if this is the fault of Visual Studio or the plugins themselves (Since many work fine). I would say that part of it is the Cordova integration in VS because for instance I was able to add opentok via the command line to a project created by cordova on the command line. I'm looking for the cause of this in certain plugins. I think it's a problem with the plugin.xml file but I can't be sure.

Either there's a bug in Cordova for VS or plugin developers need to update their files to work with VS importing. This post is to serve the purpose of possibly getting some answers or at least to help alert the plugin or Cordova devs to this issue. I would love to start using WebRTC in Cordova but I want to use VS for it's superior debugging and emulation and I can't do anything WebRTC without importing plugins. I did open up an issue for this on PhoneRTC's Github and the Cordova bug tracker.

Thanks to anyone who might be able to help.


Solution

  • You can download the PhoneRtc plugin github repository as zip, unzip to a folder and install the plugin from there using the local method.

    This will, for example, circumvent known issues in Visual Studio like connect to the internet behind a proxy with username and passwords. It takes some time to complete though but it will complete eventually.