Image does not show on launchscreen

I have a launch screen, with a png image.

I test either on XCode 11.1 or XCode 11.2beta2.


1. It shows on simulator (Version 13.2 (SimulatorApp-912.4 SimulatorKit-570.3 CoreSimulator-681.14)), but does not show anymore on device (Xs 13.1.3)

However, UILabels show normally.

I cannot be sure, but seems to be since I upgraded to 13.1.3 from 13.1.2


I have tested in dark and light mode, no effect.

I have removed the app from the device and reloaded, no effect.

I tested with opaque or non opaque view as launchscreen view, no effect

However, image is here: I move a Label to be behind it ; it does not show anymore, which indicates that the image hides it. Just as if image as bachground drew but not its content.

Changed imageView background from systemBackground color to no color: no change, except it does not hide the label if moved behind (which was expected)

I inserted another image, it shows.

-> Conclusion, something not correct in my png image.


2. In addition, I note that, in XCode, the launchscreen appears always with black backgroung (I set its color to system background) ; but other storyboards appear as white background (same system background setting).


Any clue to 1 and 2 ?

Accepted Reply

That was a problem of png image. I used a new copy of the file, and it now shows. But still does not explain the difference between simulator and device…

Replies

That was a problem of png image. I used a new copy of the file, and it now shows. But still does not explain the difference between simulator and device…

The only workaround that works for me was to add the images outside Images.xcassets folder. After modified this and rebuild the app, it worked expected.
Some issue it's happening on the iOS 14 or XCode 12.