5

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

Community
  • 1
  • 1
Shy
  • 401
  • 1
  • 5
  • 15
  • 2
    Please make sure you are using right names and size of splash screen. Default-Portrait~ipad.png -- 768 x 1004 Default-Portrait@2x~ipad.png - 1536 x 2008 Default~iphone.png - 240x 320 Default@2x~iphone.png - 640x960 Default-568h@2x~iphone.png - 640x1136 – Gopal vaid Mar 10 '14 at 06:46
  • Yes, that was it. The default name was wrong. – Shy Mar 11 '14 at 07:20
  • You might want to mark this answered if your problem is fixed. – Gwash3189 Mar 18 '14 at 23:39

4 Answers4

5

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.

Community
  • 1
  • 1
Abe
  • 51
  • 2
3

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

<key>UILaunchImageFile</key>
<string>LaunchImage</string>
Nikita Krasnov
  • 231
  • 3
  • 3
2

Gorpal said in a comment

Please make sure you are using right names and size of splash screen. Default-Portrait~ipad.png -- 768 x 1004 Default-Portrait@2x~ipad.png - 1536 x 2008 Default~iphone.png - 240x 320 Default@2x~iphone.png - 640x960 Default-568h@2x~iphone.png - 640x1136

which worked for me. It's all about the correct name.

Robert Longson
  • 118,664
  • 26
  • 252
  • 242
Shy
  • 401
  • 1
  • 5
  • 15
0

For me I just added the key, Launch Image on the Info tab, similar to Nikita's answer:

enter image description here

occasl
  • 5,303
  • 5
  • 56
  • 81