0
votes

Is it possible to use ngCordova with Adobe's Phonegap Build service? This article states that the phonegap build service can now leverage cordova plugins. It specifies that plugins must be sourced from plugins.cordova.io. So for example, in config.xml:

<gap:plugin name="com.phonegap.plugins.example" version="0.3.3" source="plugins.cordova.io" />

However, the docs for ngCordova typically only point to a github repository, rather than a hosting location at plugins.cordova.io, e.g. http://ngcordova.com/docs/plugins/appVersion/Is there a way to determine if a particular ngCorova supported plugin is available at plugins.cordova.io so that it can be included in phonegap's config.xml as a gap plugin?

I don't think that simply adding them to the project locally, for example

cordova plugin add https://github.com/whiteoctober/cordova-plugin-app-version.git

will work when compiling with the phonegap build service.

1
If you go to the Github pages for those plugins they often have instructions on including the plugin for PhoneGap Build.Subjective Effect

1 Answers

1
votes

Short answer is no. You can't include it as a gap plugin. Workaroud is quite simple, though.

Download the latest ngCordova plugin. Copy ng-cordova.min.js to your www/js folder. Add it to your index.html file.

<script src="js/ng-cordova.min.js"></script>

It is very important that the above line appears above the cordova.js script, otherwise you’re going to experience strange results.

Be sure to use the same plugins repos from PhoneGap Build as they are mentioned in ngCordova documentation (from https://stackoverflow.com/a/26804250)