Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Black screen instead of launch image on iPad

I am developing an iPhone app for iOS 6.1 and 7 (using Xcode 5). I have a problem with iPad launch images.

On iPad 7.0 and 7.0.2, the launch image is not showing up(in 6.1 works!): I get black screen while app is loading.

I don't face this issue with iPhone 6.1 and 7.0.2, although I set all launch images required for iPad and iPad retina (landscape and portrait) and I use Asset Catalog.

What am I missing?

like image 515
nicky_1525 Avatar asked Oct 07 '13 07:10

nicky_1525


People also ask

Why is my app screen black?

One of the reasons behind the Android phone black screen won't turn on is the incompatible apps you have installed on your device. So, to fix the black screen problem, all you need to do is get rid of incompatible applications and programs from your Android device in safe mode.

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 I add launch screen to Xcode 13?

If your project doesn't contain a default launch screen file, add a launch screen file and set the launch screen file for the target in the project editor. Choose File > New > File. Under User Interface, select Launch Screen, and click Next.


3 Answers

Recently I faced same issue with my App designed only for iPhone , I had the problem where the launch images would not appear in iPad (On iPad ios >= 7.0.x the launch image is not showing up I get black screen while app is loading (in iPad ios < 7.0.x it works fine )).

I don't face this issue of launch image with iPhone worked fine in all iOS versions.

Solution: Is to update to asset catalog to manage your app's images and target only iOS 6 and Prior.

Steps :

Step 1:

Update to Asset Catalog

Step 2:

Select to Migrate

Step 3: on the top right corner click on the 'Attribute Inspector' icon. Here you can set the Target OS for the Launch Images.

Uncheck the iOS 7 check boxes for iPhone

Uncheck the iOS 7 check boxes for iPhone, Now you should be able to see the launch images for iPad on iOS >= 7.0.x.

like image 154
Samyukt Shah Avatar answered Nov 06 '22 17:11

Samyukt Shah


If you have the same situation like mine, that's solution:

My app is landscape only, iOs7 only, ipad\iphone (XCode 5).

Problem: black launch on iphone (and simulator), normal launch in ipad.

Solution: go to Images.xcassets - Launch Images - select it. Uncheck at right all "iOs7 and later" boxes. Check "iOs6 and prior" boxes and fill empty spaces with images.

Strange, but works.

like image 35
djdance Avatar answered Nov 06 '22 18:11

djdance


Per Apple's documentation (link); an empty iPad specific storyboard may be the answer. I've also seen issues where the initial view controller is not set within a storyboard causes a black screen. A variant of this issue might be an incorrect setting in the app plist.

Technical Q&A QA1780 Why does my app launch to a black screen on iPad?

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 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.

like image 12
Tommie C. Avatar answered Nov 06 '22 16:11

Tommie C.