Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cordova iOS Splash Screen

I can't make the splash screen stay until the page is loaded. I have read every entry in the first, second and third page of google search. I read all the questions posted here on stackoverflow including A good explanation but none seem to work.

What's worse is that the behavior I'm seeing is all wrong. Following the instructions here I added alert at the deviceready event and I saw it happens after the white page is gone and my initial page is loaded. I installed the plugin and included the following in the root level config.xml:

<feature name="SplashScreen">
    <param name="ios-package" value="CDVSplashScreen" />
    <param name="onload" value="true" />
</feature>
<preference name="AutoHideSplashScreen" value="false" />

I am still getting Splash->White screen->My initial page. I am using Cordova 3.3.0 with ionicframework. What am I doing wrong?

EDIT

I think it might have something to do with this error message:

The splashscreen image named Default-Portrait was not found

like image 756
Shy Avatar asked Mar 04 '14 18:03

Shy


People also ask

What is splash screen in iOS?

Splash screen is commonly found in iOS apps, as well as, other desktop applications. This is the first screen you see when launching an application. Usually, splash screen is an image covering the entire screen and disappears after the main screen is loaded.

How do you add a splash screen in ionic 5?

By adding a platform, Ionic will install Cordova splash screen plugin for that platform so we do not need to install anything afterwards. All we need to do is to find two images. The images should be png, psd or ai files. The minimum dimension should be 192x192 for icon image and 2208×2208 for the splash screen image.

What is Cordova res?

This tool will crop and resize JPEG and PNG source images to generate icons and splash screens for modern iOS, Android, and Windows. cordova-res was developed for use with Cordova, but Capacitor and other native runtimes are supported.


2 Answers

I have just had the same issue and found that Gopal's answer was not the solution (as I already had my files named and sized correctly).

Instead I found this answer to be correct: Cordova 3.4 iOS white screen after splash

Alternate solution in brief:
Duplicate your "Default@2x~iphone.png" and rename it to "Default-Portrait@2x~iphone.png". Then drag that file into your Project Files in XCode under "Resources/Splash" so that it is recognised when Xcode builds.

like image 185
Abe Avatar answered Nov 15 '22 09:11

Abe


If cordova-plugin-splashscreen can not find images, you can specify UILaunchImageFile key in plist.

<key>UILaunchImageFile</key>
<string>LaunchImage</string>
like image 20
Nikita Krasnov Avatar answered Nov 15 '22 07:11

Nikita Krasnov