我正在使用一个信号插件进行推送通知。
首先我安装了一个信号插件。
ionic cordova plugin add onesignal-cordova-plugin
npm install --save @ionic-native/onesignal
这是我的代码
this.platform.ready().then(() => {
this.oneSignal.getIds().then((ids)=>{
console.log("USER ID");
console.log(ids.userId);
}).catch((e)=>{
console.log("error")
console.log(e);
})
})
但是没有得到app id.why?
错误为plugin_not_installed
。
我删除了这个插件再次添加。
但仍然得到同样的错误。并且还得到这种类型的错误。
Ionic Native: deviceready did not fire within 5000ms. This can happen when plugins are in an inconsistent state. Try removing plugins from plugins/ and reinstalling them.
Native: deviceready did not fire within 5000ms. This can happen when plugins are in an inconsistent state. Try removing plugins from plugins/ and reinstalling them.
请建议我,
感谢。