我正在尝试使用Appsee https://www.appsee.com/docs/ios/ionic or UXcam https://uxcam.com/docs
我尝试像下面这样导入,但没有成功
// 从 '@ionic-native/appsee' 导入 { Appsee };
在其他地方,我看到你必须声明有问题的变量,以便打字稿识别该变量,我这样做如下
声明 var cordova:any;
// import { Appsee } from '@ionic-native/appsee';
declare var cordova:any;
@Component({
templateUrl: 'app.html'
})
export class MyApp {
rootPage:any = LoginPage; // FOR TESTING
constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen) {
platform.ready().then(() => {
cordova.plugins.Appsee.start("my key");
// 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();
splashScreen.hide();
});
}
}
我还尝试将 public appsee: Appsee 添加到构造函数中,但仍然没有成功。
任何指导表示赞赏。我越来越ReferenceError:cordova 未定义。
如何导入自定义插件,appsee https://www.appsee.com/docs/ios/ionic
编辑添加建议代码
声明 var Appsee:any;
@Component({
templateUrl: 'app.html'
})
export class MyApp {
rootPage:any = LoginPage; // FOR TESTING
constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen) {
platform.ready().then(() => {
Appsee.start("my key");
// 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();
splashScreen.hide();
});
}
}