Just trying to get the IBM cordova push plugin working with Ionic. The documentation is good for Cordova, but there is no guidance for Ionic. Just looking for the best way to approach this. thanks
As @beaver mentioned in his comment, there should be no major difference, Cordova is still used in Ionic projects so you can manage cordova plugins in an Ionic project like you'd manage them in a Cordova project. This said, you can follow the same documentation for setting cordova client plugin for bluemix with the following exceptions:
In the section titled: Installing the Cordova plug-in
npm install -g cordova ionic
ionic start myApp blank
ionic platform add android
or ionic platform add ios
then follow step 5 of the tutorial to set the minimum versions.In the section titled: Initializing the cordova plug-in
This is the important part, the IBM bluemix plugin must be initialised after the Ionic framework has completed loading, that's why we need to modify step 1 of this section, instead of adding the initialization code globally in index.js, add it before the end of the $ionicPlatform.ready
function like the code below
angular.module('starter', ['ionic']).run(function($ionicPlatform) {
$ionicPlatform.ready(function() {
// some initialization code
// then
if(BMSClient)
BMSClient.initialize("app-route", "app-guide");
});
})