I am having trouble using third party cordova plugin in Ionic 2 project some of which are not available in Ionic Native. As far as I am concern, the plugins which are outside of Ionic Native, I dont need to import them. They are available directly.
I am using ibm-mfp-core (https://www.npmjs.com/package/ibm-mfp-core) plugin. All I want to use BMSClient.initialize()
method to initialize IBM Bluemix SDK. Plus there are some other built-in. But none of them are available in cordova.plugins.
Here’s the snippet :
import { Component } from '@angular/core';
import { Platform, ionicBootstrap } from 'ionic-angular';
import { StatusBar } from 'ionic-native';
import { TabsPage } from './pages/tabs/tabs';
declare let cordova:any;
@Component({
template: '<ion-nav [root]="rootPage"></ion-nav>'
})
export class MyApp {
public rootPage: any;
constructor(private platform: Platform) {
this.rootPage = TabsPage;
platform.ready().then(() => {
// Okay, so the platform is ready and our plugins are available.
// Here you can do any higher level native things you might need.
StatusBar.styleDefault();
// initialize IBM BLuemix SDK
//BMSClient.initialize("https://pearl.mybluemix.net", "1a1ab2e9-4f5a-4db6-9ba3-2da97349a160");
typeof cordova.plugins.MFPCore != 'undefined'?alert('MFP found'):alert('MFP NOT found');
});
}
}
ionicBootstrap(MyApp);