이온 성 2 프로젝트에서 제 3 자 코드바 플러그인을 사용하는 데 문제가 있습니다. 일부는 이온 성 네이티브에서 사용할 수 없습니다. 내가 염려하는 한, Ionic Native 외부에있는 플러그인은 가져올 필요가 없습니다. 그들은 직접 사용할 수 있습니다.이온 2에서 코드바 플러그인을 사용하는 방법
저는 ibm-mfp-core
(https://www.npmjs.com/package/ibm-mfp-core) 플러그인을 사용하고 있습니다. 모두 BMSClient.initialize()
메서드를 사용하여 IBM Bluemix SDK를 초기화하고 싶습니다. 거기에 플러스 몇 가지 다른 내장되어 있습니다. 그러나 어느 누구도 cordova.plugins
에서 사용할 수 없습니다.
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);
답장을 보내 주셔서 감사합니다. Dave. 불행히도 당신이 위에서 지적한 자원들은 나를 도와주지 못했습니다. 그것들은 심하게 구식이며 작동하지 않습니다. 플러그인의'plugin.xml' 파일을 확인했습니다. 플러그인이'cordova.plugins' 컬렉션에 묶여 있지 않음을 발견했습니다. 그래서 그것은 직접 접근 가능해야했습니다. 그러나 그렇지 않습니다. – somnathbm