4

I have set the launch images in an asset catalog (LaunchImage), which I've also set in the target's "General" tab in Xcode. The default LaunchScreen file was being shown when running the app, but I read this post and I did what it is said there: to left empty the Launch Screen File parameter both in "General" tab and in .plist

But now, instead of showing the appropiate launch image from catalog or the default one, I'm showing a black screen...

I'm supporting only iPhone, and iOS 7, 8 & 9.

What could I be missing?

Thanks

EDIT: could this be because of incorrect image sizes? For example, for the iPhone Portrait Retina HD 5.5 I have a file of size 1242 x 2208 and name [email protected], is that correct?

EDIT 2: This is what I have in the target's "General" tab. target settings

3
  • Use image assets for Launch images in that case. Just drop two images of size 2x(640 x 960) and Retina 4(640 x 1136). Works fine for me. Commented Dec 15, 2015 at 11:04
  • @iAnum yes, that's what I'm trying, to take the launch images from the image assets... but it does not work Commented Dec 15, 2015 at 11:08
  • @AppsDev please check this answer : stackoverflow.com/questions/34043541/… Commented Dec 15, 2015 at 11:51

2 Answers 2

15

Well what I've noticed that when you create a new project by default you will get LaunchScreen.storyboard as you Launch Screen Image.

But if you don't want to use LaunchScreen.storyboard then what you do is remove LaunchScreen.storyboard and tap on Use Asset Catalog.

But by default it will give you Brand Asset instead of Launch Image in Xcode Version 7.1.1.

Now click on the arrow besides Brand Asses/Launch Image. Xcode will navigate you to Assets.xcasets folder.

Now click on + below to add App Icons & Launch Images.

From there you need to select New iOS Launch Image. enter image description here

This is how your LaunchImage should be visible. enter image description here

Now add the images according to size specified in the Apple Documentation. You can also get Launch Image Size from this url: LaunchImageSize

Now go application>Targets>General and in Launch Images Source select LaunchImage. enter image description here

Here is the image with LaunchImage added in Assets.xcassets. enter image description here

Simulator Image on launching App. enter image description here

Hope it helps in solving your problem.

Sign up to request clarification or add additional context in comments.

2 Comments

I tried this, but it didn't work: stackoverflow.com/questions/43168145/… Any idea why? Thanks very much.
I just figured this out. My launch image was not showing up, I get a white screen when launching on a device (iPhone 6, 7+) or testFlight. Fix: Renamed "Landing_screen.png" to just "Landing_screen" removing .png part. The image icon in Xcode changed to white icon and in the launch screen storyboard the image appears as a question mark now. The Launch image now appears and not the white screen.
0

Have you changed the setting for your project so that it points to the Asset Catalog as the source for your Launch Image?

enter image description here

4 Comments

Yes, I've just edited my question with a screenshot of what I have there.
add perfect size image for all device.
using inspector you can know what image size required.
I think I'm already doing that... is the example I provide in my question ok?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.