avuthless avuthless - 24 days ago 14
iOS Question

iOS 9 xCode 7 built app displays black rectangle instead of splash screen

I know this question may seem like a duplicate of a few existing ones but its not.

I am struggling with this issue where universal (iPad/iPhone) application does not display the splash screen anymore.

Before upgrading to iOS 9 and Xcode 7, no such issues were present. After upgrading no changes were made to the splash screen in any way.

Tech data relevant to the question:


  • Supported devices are iPad (landscape only) and iPhone
    (portrait/landscape)

  • I use "Launch Screen.xib" that has an UIImageView with size classes and
    constraints set up so that it's always full screen.

  • I have added all splash screen images in image assets (except iPad
    Portrait ones)

  • I use Xcode Version 7.0.1 (7A1001) and iOS 9.0.2

  • This issue does not happen on an iPad



The wrong splash screen looks like this on iPhone 5s:
iPhone5S showing wrong Splashscreen

This is made in portrait mode, so there are white squares on top and on bottom of this "black square".

I was struggling with this issue yesterday but I managed to fix it by renaming my launch screen to "LaunchScreen.xib" (without the space). But this morning the issue re-appeared.

Things I've tried:


  • Removing and creating LaunchScreen.xib again with and without space

  • Creating LaunchScreen.storyboard file instead of xib

  • Adding @2x and @3x versions of image used in LaunchScreen.xib

  • Removing/adding/replacing images in image assets

  • Cleaning, build cleaning and even deleted derived data

  • Restarting device, reinstalling app, relaunching without building and many other solutions that I could think of.



Nothing helped, so maybe someone fixed a similar issue already and can lead me to the right direction.

EDIT 1

So I renamed my LaunchScreen.xib image used from "Default.png" to "DefaultSplash.png". This instantly fixed all issues on iPhone. But now I have a new problem - iPad splashscreen is now black. If I set the LaunchScreen image to some other image used in project, the Ipad displays it as splashscreen without any problems, but neither Default.png nor DefaultSplash.png can be used on ipad now. This is really weird issue.

Answer

So i fixed the issue like this:

Sine i renamed the file in LaunchScreen.xib it fixed issue on iphone but cause identical problem for ipad. And since then i cannot use same image file name for same xib (i.e. if image "Default.png" failed it cannot be used anyomre... Bug?) i created two files: "LaunchScreen.xib" and "LaunchScreen~iphone.xib" with separate image file for each. Now it works okay...

Seems ugly and buggy but it works.

Comments