s korhani
s korhani

Reputation: 356

How to install cordova plugin from a forked repository

To install a phonegap plugin I can installed it using

cordova plugin install https://github.com/wymsee/cordova-HTTP.git

and adding the following into config.xml

<gap:plugin name="com.synconset.cordovahttp" version="0.1.4" />

as mentioned in this official document.
Now I need to installed from a forked repository and build the app for iOS and because I'm working on Windows, I need to use Phonegap cloud service.

Is it enough to install it using:

cordova plugin install https://github.com/brendonparker/cordova-HTTP.git

If yes, what should I put in config.xml?

Upvotes: 7

Views: 3813

Answers (2)

jcesarmobile
jcesarmobile

Reputation: 53301

Note: by the time this was answered this was the only way of using a fork in phonegap build service. The accepted answer was not an option for phonegap build service, only worked for Cordova users. I won’t update since phonegap build service is now defunct.

Old answer: You have to publish the fork on npm (with a different id from the original you forked, something like com-korhani-cordovahttpfork), and then use it on phonegap build like this:

<gap:plugin name="com-korhani-cordovahttpfork" source="npm" />

Info about publishing cordova plugins on npm https://cordova.apache.org/announcements/2015/04/21/plugins-release-and-move-to-npm.html

Upvotes: 0

404
404

Reputation: 1155

Its as simple as that, all you need is to fork the plugin to your git and then use the cli to add the plugin to your project via

cordova plugin add https://github.com/username/forked-plugin-name.git

and then if required edit the config.xml accondingly

Upvotes: 12

Related Questions