Home > OS >  Ionic always show blank screen after splash screen
Ionic always show blank screen after splash screen

Time:01-28

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.

CodePudding user response:

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();
        }
    });
}

CodePudding user response:

I resolved the issue, it is regarding the plugin that I add, so i tried to do this

  1. uninstall plugin
  2. remove ios folder
  3. fresh install node modules
  4. add plugin
  5. add ios folder

hope it is help whoever that has same issue.

  •  Tags:  
  • Related