Launch Screen not displaying iOS 8
Asked Answered
O

18

23

I'm trying to get the Launch screen to display instead I get the default black screen.

I remember I've had this issue in the past and is something really silly but I can't remember what it is.

I have a LaunchScreen.xib. I've set in my target -> info to use LaunchScreen and not image catalog. I am running iOS 8 and using Xcode 6.1. I tried on all iPhone simulators and iPhone 4s.

I can't think what more info to give than that.

Obara answered 22/12, 2014 at 15:27 Comment(0)
T
26

I had the same issue. Turned out that I had earlier tried to attach a viewcontroller file with the launchscreen. To fix:

  1. Go to launch screen
  2. Click Connections Inspector in right pane
  3. Remove all connections.

Accoring to @doctorBroctor: also go to the File's Owner tab and remove the connections there.

Tedesco answered 26/10, 2015 at 16:17 Comment(3)
This worked for me. However, I also had to go to the File's Owner tab and remove the connections there.Purpleness
@Tedesco You should include doctorBroctor's comment in your answer as well.Selectee
@K.K: Just added those commentsTedesco
B
32

For those who are still looking for another answer here's what worked for us:

Our launch xib only contains an imageView in the middle of the view. For some reason the image never showed (but the view was there, checked it with changing the background color).

The solution was to move the image file out of the image catalog and just drop it in the project as a standalone file. Pretty strange considering when we tried other images from the catalog they appeared correctly but not this one. Anyway, I hope this helps someone!

Blackandwhite answered 8/3, 2016 at 18:57 Comment(4)
Recently I attempted to use a custom font in my "Launch Screen.storyboard" file. The reason I could not became clear after reading this SO answer and a little more research / testing. It is the same with an image... Xcode prepares portrait & landscape snapshots of your app's launch screen and (currently) saves it here: /Library/Caches/Snapshots/<<app_bundle>>/. This is done before system / supporting files are loaded, including custom fonts and the asset catalogue.Sachet
I just spent 2 hours figuring this out ...so yes, as of right now, this is still a problemTertian
This worked for me too...thanks a lot, But I still don't understand, what the problem was before ..?Portiere
This answer worked for me.Multiflorous
T
26

I had the same issue. Turned out that I had earlier tried to attach a viewcontroller file with the launchscreen. To fix:

  1. Go to launch screen
  2. Click Connections Inspector in right pane
  3. Remove all connections.

Accoring to @doctorBroctor: also go to the File's Owner tab and remove the connections there.

Tedesco answered 26/10, 2015 at 16:17 Comment(3)
This worked for me. However, I also had to go to the File's Owner tab and remove the connections there.Purpleness
@Tedesco You should include doctorBroctor's comment in your answer as well.Selectee
@K.K: Just added those commentsTedesco
I
8
  • Go to your launch screen
  • Go to file inspector
  • Check the checkbox for "Use as Launch Screen"

enter image description here

Inhibitor answered 5/6, 2015 at 19:26 Comment(0)
H
8

I have tried with:

  1. Deleted Launch Screen File.

  2. Tapped on Use Asset Catalog in Launch Image Source and added Splash screen Images as desired in the image asset.

  3. Deleted Previous Project on Simulator or Device. Clear the Project.

  4. Run Again and it is showing now.

Humming answered 15/10, 2015 at 10:43 Comment(0)
F
6

One reason for why you might experience the black screen instead of your launch screen is that the .xib file might not get copied in your build phase. At least that was my issue that caused my app to show the black screen even though I had done the steps you describe.

So, double check that your LaunchScreen.xib (or whatever it is named) appears in:

Your target -> Build Phases -> Copy Bundle Resources

And if not, make sure to add it. That resolved my issue.

Fairspoken answered 29/4, 2015 at 8:27 Comment(0)
H
6

For me the problem was that I hadn't selected the LaunchScreen.storyboard in the General tab of the project settings.

enter image description here

Hernandez answered 15/10, 2015 at 2:57 Comment(1)
Worked for me, and to clarify, I changed the setting from "LaunchScreen" to "LaunchScreen.storyboard" and problem was resolved. Also note that the original setting "LaunchScreen" is no longer showing as an option. Seems like an xCode bug.Hyetology
U
4

I've experienced the same issue. The solution for me was simply delete the app, reboot the device, then reinstall it. I think iOS caches the Launchscreen, and this cache is not invalidated every time when it should be.

Uraninite answered 13/6, 2016 at 12:59 Comment(1)
Rebooting the device was the key indeed. Found it out myself, but good to check this. Sometimes a fix can be so easy.Valdivia
M
3

I had the same issue in iOS 9 as well. Deleting the old app in simulator alone is not enough. Simulator has to be quit launched. It worked for me.

Maxma answered 3/5, 2018 at 9:30 Comment(0)
W
2

I fix it by select the "is Initial View Controller" in storyboard.

Whitworth answered 24/8, 2016 at 3:49 Comment(0)
C
2

Make sure to delete the installed app from the emulator. Then run the app again from xcode (product->clean, product->run). That worked for me.

Chickabiddy answered 24/8, 2016 at 20:48 Comment(1)
I needed to restart the simulator with default settings.Overfill
O
1

I've looked at all the above answers, it helped a bit. Especially the answer by Suragch put me in right direction.

The LaunchScreen.storyboard isn't showing up, even after applying simple background colour to the view and removing the image.

Firstly, I cannot see the "LaunchScreen.storyboard" as shown in the imagebelow

This was because, some reason the LaunchScreen.storyboard wasn't added to the build Target. Solution: Ensure the LaunchScreen.storyboard is included to the build Target. Also, Choose the LaunchScreen.storyboard from the drop down as shown in above pic.

I hope it helps someone!

Olaolaf answered 9/10, 2016 at 14:57 Comment(0)
L
1

I found this old post 'cause my launch screen WAS working, then it stopped. I thrashed around for a good while and then realized this, undocumented problem:

If your launch XIB or storyboard file has a UIImageView with an image whose name contains a space, the entire screen won't load.

Lemmons answered 10/3, 2017 at 1:43 Comment(0)
S
0

New feature in the iOS 8 SDK: you can now use a storyboard scene in place of your app’s launch images.

  1. Create a blank storyboard file named LaunchScreen.storyboard.

  2. Go to your target settings and, on the General tab, select the storyboard as your Launch Screen File. Xcode will add a corresponding UILaunchStoryboardName key to your app’s Info.plist. When this key is present, Xcode will prioritize it over any launch images you might have set.

  3. Add a view controller scene to the storyboard. Add some subviews to the scene and position them with constraints. When you launch the app on a device, the OS should use the scene as the launch screen.

For more information check out this blog post by Ole Begemann "Replacing Launch Images With Storyboards".

Sclerous answered 22/12, 2014 at 15:37 Comment(0)
C
0

I only had a centered UIImageView in my LaunchScreen.xib that contained an image (.png file), and had the same black screen showing.

I removed the image (the .png file) from the project, added it again with new name, and used the new image.

Cultism answered 1/4, 2016 at 15:14 Comment(0)
C
0

Make sure to use empty Launch Screen File, then Xcode would use Launch Image Source.

Coenocyte answered 10/7, 2016 at 21:14 Comment(0)
D
0

Make sure you have "is initial View Controller" checked in interface builder. I tried pretty much everything else but this finally fixed the problem and now it works in simulator as well as the device.

Donatus answered 14/6, 2018 at 17:53 Comment(0)
L
0

Reset Simulator working for me

Reset Simulator

For iOS 14 and newer:

Device > Erase All Contents and Settings...

For iOS 11 and newer:

Hardware > Erase All Contents and Settings...

For previous versions:

Simulator > Reset Content and Settings...

Like answered 1/5, 2021 at 8:9 Comment(0)
P
-4

Your launch image should be a PNG. A JPEG may work under certain targets, but you should use PNG anyway.

Par answered 22/12, 2014 at 15:45 Comment(1)
He is not using an image as a launch screen so your answer does not help him, he is using a nib file to produce a launch screen.Droll

© 2022 - 2024 — McMap. All rights reserved.