38

I just downloaded Xcode 11 Beta 4 and when I want to build my Swift 4 project gives me:

UILaunchImages has been deprecated, use launch storyboards instead

How can I fix it?

rmaddy
  • 314,917
  • 42
  • 532
  • 579
SwiftDeveloper
  • 7,244
  • 14
  • 56
  • 85

4 Answers4

49

Please read the release notes for Xcode 11 beta 4:

Known Issues

Your app might fail to build if it contains a launch image. The failure message resembles the following: “The launch image set named <image set name> did not have any applicable content.” Launch images are deprecated and should be removed; use a launch storyboard or .xib file instead. (50210495)

Workaround: Clear the build setting ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME.

Community
  • 1
  • 1
rmaddy
  • 314,917
  • 42
  • 532
  • 579
  • 1
    Please note that Apple is going to completely remove support for launch images in the near future. You really should migrate to a launch screen storyboard. You will have no choice eventually. – rmaddy Jul 17 '19 at 21:54
  • THANK YOU. Finding that setting was not obvious. – Amy Dec 01 '19 at 07:43
  • Could you please help me ho to show launchImage from assets in Xcode 11 project. In targets launch image catalog asset is missing. How could I user launch image now. – shashi Gupta Apr 13 '20 at 12:30
  • Thank You. Solved my issue. – Ripa Saha Jun 09 '20 at 08:00
  • 1
    @shashiGupta please use link https://stackoverflow.com/questions/58186505/xcode-launch-image-source – xcodedeveloper Sep 01 '20 at 06:49
  • I was getting build warnings about launch images being deprecated even though I had a launch storyboard. Plus deleting my legacy launch images in my asset catalog resulted in a build error. Clearing the ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME build setting solved the problems. – friherd Mar 02 '21 at 18:12
45
  1. Xcode -> File -> New -> File... -> Launch Screen.

  2. Select Target -> Build Settings -> Search "LaunchImage" & delete string from (Debug and Release) Asset Catalog Launch Image Set Name.

  3. Select "Assets.xcassets" & remove LaunchImage from it.

  4. Build & Run.......enjoy

ascripter
  • 5,665
  • 12
  • 45
  • 68
thevikasnayak
  • 559
  • 5
  • 13
  • I did all of these but old launch image is still appearing as before. Yes, I did a Clean Build Folder first. And closed Xcode and restarted. – Alyoshak Dec 23 '19 at 16:50
  • 2
    Fixed. Had to go to General tab in the Targets settings, and under App Icons and Launch Images choose my new launch screen in the Launch Screen File drop-down box. – Alyoshak Dec 23 '19 at 16:57
  • 1
    I did this and app started with black screen. – bikram Jun 23 '20 at 11:37
  • I needed to do this too or else I got a new error warning me I was missing a launch image. https://stackoverflow.com/a/42491551/957245 – Declan McKenna Aug 11 '20 at 15:27
30
  • add a new storyboard to your project
  • name it LaunchScreen.storyboard and save
  • add a new view controller to your LaunchScreen, add an imageView, and reference your launch image
  • make LaunchScreen.storyboard your initial view controller in the Attributes Inspector (make sure to uncheck the old initial view controller)
  • in your General settings (App Icons and Launch Images) in the Launch Screen File dropdown, select LaunchScreen

After testing, to get rid of compiler warnings, delete the LaunchImage folder in Images.xcassets, and in Build Settings, delete LaunchImage (in Debug and Release) from Asset Catalog Launch Image Set Name.

Bikeboy
  • 543
  • 4
  • 5
  • 1
    This is the hardest way possible to create a launch screen storyboard. Xcode actually has two different ways to specifically create a launch screen storyboard which both eliminate most of the steps outlined here. – rmaddy Aug 21 '19 at 13:50
  • 4
    @maddy I'm sure everyone would be happy if you could share your more efficient solution. After all, that's why we're here, right? – Bikeboy Aug 28 '19 at 15:57
  • 6
    Xcode -> File -> New -> File... -> Launch Storyboard. That replaces your first 4 bullets. – rmaddy Aug 29 '19 at 01:53
  • 5
    In Xcode 11 Release, the entry is File -> New -> File -> Launch Screen – nontomatic Sep 21 '19 at 11:32
  • 2
    Providing the steps was helpful as my project already had a `Launch Screen.storyboard` file set up. I needed to follow the 4th and 5th steps to get rid of the warnings. (Xcode 11 release, not beta) Also, note that "General settings" means the Target settings' General tab, while the Build settings tab is under both the Target and Project settings. – leanne Oct 16 '19 at 22:59
  • How a single launch screen file will work for different size devices? Just curious – youngseagul Apr 21 '20 at 15:08
  • For tvOS there is no "Launch Screen" option from the File > New > File… menu and "Is Initial View Controller" needs to be set, unlike iOS. – Dave Dec 22 '22 at 21:45
6

In my case a couple things were happening...

  1. I had in my Info.plist file UILaunchImages which was causing this warning. After deleting it, the warning went away.
  2. On the General tab of my ProjectTraget the Launch Screen File was empty. So, adding my launch screen file there from the drop down made my app launch correctly again (This was my main storyboard file).

I hope this helps anyone else having the same warning, and also their app looking letter-boxed.

valbu17
  • 4,034
  • 3
  • 30
  • 41