SaleenS7
SaleenS7

Reputation: 402

Missing default-568h@2x launch image, launch image won't display

I set up the launch images as so, XCode forced me to rename the images which is ok, but for some reason when I run iOS Simulator, there is no launch image displayed. Instead, a black screen is displayed. Previously I had the warning Missing default-568h@2x launch image which went away when I clicked add on the menu that was popping up when I expanded the warning. However the launch images still do not display when launching the app. I have tried resetting all content, cleaning, building, and then running again, but nothing seems to be working. Additionally, XCode did not rename any of my images to default568h@2x so I'm assuming that is a problem, even after I clicked add. I do have launch image set to default in info.plist.

Any suggestions?

Upvotes: 8

Views: 8657

Answers (8)

Sentry.co
Sentry.co

Reputation: 5579

None of the suggestions worked, but this did

  1. Delete the targets that cause the error
  2. Recreate the target
  3. Problem solved šŸŽ‰

Upvotes: 0

Frank
Frank

Reputation: 696

I am using Xcode 11.3.1, and I just did a project clean up, this warning is gone:

  1. ā‡§ + āŒ˜ + K to Clean Build Folder.

  2. Close Xcode.

  3. Re-open Xcode.

  4. Re-build project.

Upvotes: 0

Bill Feth
Bill Feth

Reputation: 323

Xcode 11 outputs this error if you move your Info.plist file and forget to tell Xcode about the new location in Build Settings.

The Info.plist contains metadata about your LaunchScreen storyboard/image. Apparently, Xcode assumes you want to use a launch image (and did not provide one) when it cannot find the target's Info.plist file. Updating the Info.plist location in Build Settings fixes this disconnect:

  1. Select the Project file (top item) in the sidebar.
  2. Select the Target in the Project editor.
  3. Select the Build Settings tab in the Project editor.
  4. Scroll/search for "plist", or "INFOPLIST_FILE" to be exact.
  5. Double-click the plist entry to edit it, and type in the correct location for the Info.plist file. (e.g. if you moved it to a Resources folder within the MyGreatApp project root folder, set the value to "MyGreatApp/Resources/Info.plist")

This is not the OP's situation (they intended to use launch images), but I thought I would add this breadcrumb for anyone like me who got this error after moving an Info.plist file.

Upvotes: 5

Bengi Besceli
Bengi Besceli

Reputation: 3748

No need to name a file like that.

Just doing this solves the problem :

1. Add launch images inside assets by right click / add new files.
By doing this, you will add launge images set. enter image description here

2. Then set all of these launge images.
To see the sizes do these : Select the image then you can check the size on the property inspector at right. Like this:
enter image description here

Upvotes: 1

danielhadar
danielhadar

Reputation: 2161

If (as opposed to all the previous answers) you're not interested in any launch image at all (i.e. the error appeared after deleting it), the following suffices:

1. Product > Clean

2. Product > Build

Upvotes: 0

mike123
mike123

Reputation: 1559

  1. Clean project
  2. Build project
  3. Toggle issue navigator window
  4. In the issue navigator window there will be a warning message saying Missing [email protected]
  5. Click that issue
  6. The dialog will come up prompting to add the missing file
  7. Hitting add will place the file (all black in colour) into the root of the project
  8. Issue solved

Upvotes: -1

FisherMartyn
FisherMartyn

Reputation: 856

I meet the same problem, but the result comes out because i changed the Launch Image Source Setting. Here is how I fix it:

  1. Go to the target in the Project Editor
  2. Select the General tab
  3. Find the "APP Icons and Launch Images" section and click "Launch Images Source"
  4. If the current state is "Use Asset Catalog", select "Migrate".

Problem Solved.

Upvotes: 10

V-Xtreme
V-Xtreme

Reputation: 7333

I am guessing but just try following steps :

  1. Go to the launch image path in your resources .
  2. Copy paste your image and give the same name default-568h@2x
  3. Try to clean and build the project .
  4. Then also if you are not seeing the image then just simply delete the application and install it again .

Upvotes: 1

Related Questions