Search code examples
iosxcodeswiftsplash-screen

My splash screen sometimes remains black and blank (iOS 9.2, swift 2, Xcode 7.2)


Something seems to be wrong with the splash screen that I have created. I am using the default view controller in LauchScreen.Storyboard. When I run my app on my computer's simulator, the image views in my view controller show up, but my label does not. However, when I run my app on my actual phone, only a blank, black screen shows up.

However, in some situations, when I make some completely unrelated changes to my code, the splash screen shows up! But eventually, after tweaking the code some more... it goes back to that dumb, blank screen >:(

This seems like such a strange issue, and I'm not even sure what code from my project I should share to make it easier to receive help. Has anyone else had any issues like this? Can you maybe tell me what project code or information I should share so that my issue can be solved?

Or, is there any chance that this is simply a bug in Xcode? Something I don't need to worry about when the app goes into the app store?

Thank you!


Solution

  • This problem seems to be a bug, but here are my suggestions:

    • Make sure Xcode is completely up to date
    • Clean your project
    • Try running on a device (your issue might be limited to the simulator)
    • Go Project -> General -> App Icons and Launch Images -> set "Launch Screen File" to "LaunchScreen.storyboard"