danmichaelo / cordova-plugin-appinfo

Cordova plugin that provides a method for getting the app version number across platforms (iOs, Android, WP8, Windows)
MIT License
21 stars 16 forks source link

How do I use with Phonegap Desktop please? #15

Closed elckerlyc closed 6 years ago

elckerlyc commented 6 years ago

I have not been able to get this working yet. I tried in config.xml :

Or do I have to do something with cli first? Haven't been needing to do so, so far. Sorry for dumb question.

danmichaelo commented 6 years ago

I don't know Phonegap Desktop, but installation should be the same as other plugins. Did you manage to install any other plugin? If not, try to search for general plugin install instructions.

elckerlyc commented 6 years ago

Yes, I used other plugins, hence the question. Thanks

danmichaelo commented 6 years ago

If you could also mention one or more plugins you were able to install, I could perhaps try to check how they are packaged compared to this one. And as always when reporting issues, if there's any additional information you can provide, like error messages, logs, please do so.

elckerlyc commented 6 years ago

examples that work (in config.xml):

<gap:plugin name="cordova-plugin-x-socialsharing" source="npm" />
<plugin name="cordova-plugin-inappbrowser" source="npm" spec="~1.3.0" />

The respective functions are then implemented in js in the onDeviceReady function thus: window.open = cordova.InAppBrowser.open;

and in the index.htm:

<button onclick="window.plugins.socialsharing.share('ISome text', 'A Title', 'an Image', 'a Link')">

No further installation is required by phonegap, this works just fine. But: the cordova-plugin-appinfo does not work at all, and I tried all examples I could find. Thanks for any help.

danmichaelo commented 6 years ago

Ok, sory to hear that. It's been a while since I worked with this stuff, so could be that there's a incompability with Phonegap Desktop