Why is a Launch Image needed despite having a Lauch Screen File?
Asked Answered
V

2

7

In iOS 10 I used a Launch Screen File instead of Launch Images:

enter image description here

After converting to Swift 4 in Xcode 9 for iOS 11 I get the following warning:

Missing "[email protected]" launch image

enter image description here

Why is a launch image needed when there is already the launch screen?

Viveca answered 21/9, 2017 at 3:3 Comment(3)
Your answer can be found in the link below Your AnswerVermilion
@MonwellPartee Launch Images are not required when there are Launch Screens. It seems to be a bug in Xcode, see my answer below.Viveca
I agree, seems to be a bug since Launch Images are now deprecated but still shows up.Crotch
V
7

The solution was to temporarily add a launch image asset catalog.

  1. Click on Use Asset Catalog...:

enter image description here

  1. Choose to create a new asset catalog:

enter image description here

  1. Switch back to Don't use asset catalogs:

enter image description here

  1. Delete the automatically created Images.xcassets.

  2. The warning is gone.

Viveca answered 21/9, 2017 at 3:18 Comment(3)
Do you know what difference this makes to the xcodeproj?Boggers
@Boggers It apparently clears our artifacts. Which exactly I don't know as I cannot reproduce the bug to get those artifacts. However, the procedure in the solution seems to be safe. No problems since then.Viveca
This doesnt work with Xcode 11 / iOS 13 because the launch images source is now gone.Crotch
S
0

In Xcode 9.4, if we click on iOS 8.0 and later, LaunchImage will show up a slot called iPhone X Portrait iOS 11+

enter image description here

You need to refer to Static Launch Screen Images guide https://developer.apple.com/design/human-interface-guidelines/ios/icons-and-images/launch-screen/. Here is the sizes for iPhone X

iPhone X    portrai 1125px × 2436px landscape 2436px × 1125px

enter image description here

Shellans answered 14/6, 2018 at 8:22 Comment(1)
The question title did not fully reflect the question content, so I updated it. The question is: why is a Launch Image needed despite already having a Lauch Screen File? As you see in my answer, it was due to a bug in Xcode that messed up the project settings.Viveca

© 2022 - 2024 — McMap. All rights reserved.