Using a Plugin in Phonegap Build

Questions and answers on developing, deploying and using plugins and JavaBeans

Using a Plugin in Phonegap Build

Postby Thomas.shuttleworth » Tue Jul 18, 2017 4:58 pm

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.
Thomas.shuttleworth
 
Posts: 24
Joined: Wed Apr 05, 2017 5:08 pm

Re: Using a Plugin in Phonegap Build

Postby patrick » Tue Jul 18, 2017 6:24 pm

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" />
Patrick Ruhsert
Servoy DACH
patrick
 
Posts: 3703
Joined: Wed Jun 11, 2003 10:33 am
Location: Munich, Germany

Re: Using a Plugin in Phonegap Build

Postby Thomas.shuttleworth » Wed Jul 19, 2017 10:32 am

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.
Thomas.shuttleworth
 
Posts: 24
Joined: Wed Apr 05, 2017 5:08 pm

Re: Using a Plugin in Phonegap Build

Postby patrick » Wed Jul 19, 2017 11:07 am

There are many different plugins out there :D, not all work in Phonegap...
Patrick Ruhsert
Servoy DACH
patrick
 
Posts: 3703
Joined: Wed Jun 11, 2003 10:33 am
Location: Munich, Germany


Return to Plugins and Beans

Who is online

Users browsing this forum: No registered users and 12 guests