Page 1 of 1

Using a Plugin in Phonegap Build

PostPosted: Tue Jul 18, 2017 4:58 pm
by Thomas.shuttleworth
Hi, i'm trying to add the PDFViewer plugin from git hub to a phonegap app. I've added the following line after looking at the phonegap documentation for adding plugins from github.

<plugin spec="https://github.com/Servoy/svyPDFViewer.git" source="git"/>

When I go to build I get an error which mentions a lack of a plugin.xml file. I used the file finder on github to try and find the plugin.xml but didn't have any luck so I also checked some of the other svyPlugins for mention of plugin.xml. If anyone has any experience with this or can point me in the direction of plugin.xml I would appreciate it.

Thanks,

Thomas.

Re: Using a Plugin in Phonegap Build

PostPosted: Tue Jul 18, 2017 6:24 pm
by patrick
Not knowing what kind of phonegap app you are building, the pdfViewer on github/servoy is a web component, not a phonegap plugin. To natively view PDFs on a Phonegap app, google for "phonegap pdf viewer". That gave me this for example

https://github.com/sitewaerts/cordova-p ... ent-viewer

That one can be included in the config.xml by adding something like

<gap:plugin name="cordova-plugin-document-viewer" />

Re: Using a Plugin in Phonegap Build

PostPosted: Wed Jul 19, 2017 10:32 am
by Thomas.shuttleworth
Hi Patrick,

I'd seen this post https://phonegap.com/blog/2016/02/16/git-plugins/ on the phonegap blog which mentions being able to add non Phonegap or Cordova plugins from a git but had failed to see that any plugins must be in the Cordove CLI config.xml format.

Thanks for your help, i'll try making my app work with the plugin you linked.

Thanks,

Thomas.

Re: Using a Plugin in Phonegap Build

PostPosted: Wed Jul 19, 2017 11:07 am
by patrick
There are many different plugins out there :D, not all work in Phonegap...