I have an ionic project, so after I run this build
ionic cordova run ios -l --consolelogs --target='2E565780-E17E-4358-8DD0-FFA9681D5F8C'
usually it is working fine, but somehow now I got error. It is always show me the blank white screen after splash screen is triggered. I already put this function
ngOnInit() {
console.log(this.platform);
this.platform.ready().then(() => {
if (this.platform.is("cordova")) {
this.statusBar.styleDefault();
this.splashScreen.hide();
});
}
on app.component but it seems not triggered. is there work around that I missed? any help would be really appreciated.
Try with adding a function to execute from your app.component constructor:
constructor( ... ){
this.initializeApp();
}
initializeApp(){
this.platform.ready().then(() => {
if (this.platform.is("cordova")) {
this.statusBar.show();
this.statusBar.styleDefault();
this.splashScreen.hide();
}
});
}
I resolved the issue, it is regarding the plugin that I add, so i tried to do this
hope it is help whoever that has same issue.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.