Missing plugin SplashScreen in iOS with Ionic Cordova

560 views Asked by At

I have an Ionic web/iOS application wherein I recently updated my code versions (ng10 to ng12 and minor bumps within Ionic 6) and the splash screen no longer hides. I did some looking and found that the plugin is not there, i.e. it's not available in X-code in the plug-ins list. I've tried adding removing the plugins, adding removing the ios platform entirely and switching from @ionic/native to @awesome-cordova-plugins and the plugin never loads in X-Code.

1

There are 1 answers

0
Wayne Kaskie On

The issue here is that the Splashscreen plugin is deprecated in version 6 of the related cordova-plugin-splashscreen. Blink and you'll miss it, but the indication is here https://www.npmjs.com/package/cordova-plugin-splashscreen#:~:text=cordova%2Dplugin%2Dsplashscreen%405-,If,-using%20cordova%2Dios.

I wrapped the splashscreen.hide() call in a conditional to skip this for iOS and the problem was solved.

I also updated the config to auto-hide the splashscreen using preferences.