Search code examples
iosios7

Splash screen not visible for iPad, only a black screen gets shown


I have an universal app. The splash screen loads fine for iPhone but the same is not visible on the iPad. Instead a black screen appears in its place. I have gone through the questions posted in this regard and have followed the steps but to no avail. I am using asset catalog in my project. Storyboards have not been used. The names and dimensions of the images used are as follows:

1. Default-Landscape.png (1024x768)
2. [email protected] (2048x1536)
3. Default-Portrait.png (768x1024)
4. [email protected] (1536x2048)
5. Default-568h.png (640x1136)
6. Default.png (320x480)
7. [email protected] (640x960)

Please let me know if there is anything wrong with the dimensions I am using. The options I have selected for the Attributes Inspector for the Launch image are given in the image below:

enter image description here

Following is the setting for Launch image:

enter image description here

I added the same launch images to a sample app and the launch screen showed up perfectly on iPad.

EDIT: As per the suggestion of @iphonemaclover, the problem was solved using "You should also remove any other key suffixed with (iPad) or ~ipad." There was a key UILaunchImages~ipad in the plist which I removed. Now the launch screen is properly visible.


Solution

  • Please delete your derived data and clean the your project. Also reset your simmulater if you running over it. Hope it will help. Also check you have selected Universal App in your target setting.

    EDIT

    You should probably be using an Asset Catalogue for your launch images, which might be what Xcode is expecting. You can see what Xcode is expecting in the General tab for your target:

    MORE Suggestion

    Q: Why does my app launch to a black screen on iPad?

    A: Apps that have been designed only for iPhone may launch to a blank screen when run on an iPad. This is caused by the presence of an empty iPad specific storyboard in the app bundle as well as an iPad specific UIMainStoryboardFile key in the app's Information Property List (Info.plist) file. Both are automatically created by the various Xcode template projects if the Universal option is selected.

    ...

    In Xcode

    Look for a file named MainStoryboard_iPad.storyboard in the file navigator. If this file is present, remove it from your project.

    In In your app's Information Property List

    Look for a key named Main storyboard file base name (iPad) or UIMainStoryboardFile~ipad. If this key is present, remove it. You should also remove any other key suffixed with (iPad) or ~ipad.

    Finally, test your app on an iPad or in the iPad simulator and verify that it behaves as expected.

    Launch Image settings

    You should add your launch image to your asset catalogue, and make sure the setting shown is configured correctly.

    If you don't have one already, you can add an asset catalogue by going to File > New > File, the look under the Resource tab.