致电
firebaseDynamicLinks.onDynamicLink()
我收到了警告
console.warn: Native: tried calling FirebaseDynamicLinks.onDynamicLink, but the FirebaseDynamicLinks plugin
is not installed.
console.warn: Install the FirebaseDynamicLinks plugin: 'ionic plugin add
cordova-plugin-firebase-dynamiclinks'
但插件已安装:
ionic cordova plugin
> cordova plugin ls
✔ Running command - done!
cordova-plugin-browsertab 0.2.0 "cordova-plugin-browsertab"
cordova-plugin-buildinfo 1.1.0 "BuildInfo"
cordova-plugin-compat 1.1.0 "Compat"
cordova-plugin-console 1.0.7 "Console"
cordova-plugin-customurlscheme 4.3.0 "Custom URL scheme"
cordova-plugin-device 1.1.6 "Device"
cordova-plugin-firebase-analytics 0.10.1 "FirebaseAnalyticsPlugin"
cordova-plugin-firebase-dynamiclinks 0.10.1 "FirebaseDynamicLinksPlugin"
cordova-plugin-inappbrowser 1.7.1 "InAppBrowser"
cordova-plugin-splashscreen 4.0.3 "Splashscreen"
cordova-plugin-statusbar 2.2.3 "StatusBar"
cordova-plugin-whitelist 1.3.2 "Whitelist"
cordova-plugin-x-socialsharing 5.1.8 "SocialSharing"
cordova-universal-links-plugin 1.2.1 "Universal Links Plugin"
es6-promise-plugin 4.1.0 "Promise"
ionic-plugin-deploy 0.6.7 "IonicDeploy"
ionic-plugin-keyboard 2.2.1 "Keyboard"
方法调用抛出错误
plugin_not_installed
答案 0 :(得分:4)
您需要始终访问platform.ready()
执行:
constructor(private platform:Platform){}
当你打电话给插件时:
this.platform.ready().then(() =>{
firebaseDynamicLinks.onDynamicLink();
//....
});