Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Launch Screen not working on iOS 14 with Xcode 12

I am very frustrated now. I upgraded Xcode to version 12 and tested my app on iOS 14. Now the problem is, that my launch screen is just showing in black. I tested it with an iOS 13.5 device and it is still working as expected. I tried to remove the launchscreen.storyboard approach and added the Launch Screen key in the info.plist, but then the image is scaled to full size.

Now I tested a little bit with the launchscreen.storyboard and I found a few things.

  • If I remove the Image view, the launch screen is showing as expected. I added just a label and that would work.
  • If I use an image from the system in the image view, it is working as well. It is just not working when I am using an image from the project.

Did you experience issues with iOS 14 and the storyboard approach?

If yes, how did you fix it?

like image 297
Sylber Avatar asked Sep 20 '20 11:09

Sylber


People also ask

How do I change launch screen in Xcode?

Choose File > New > File. Under User Interface, select Launch Screen, and click Next. Give the launch screen file a name, choose a location, select the target that you want to add the file to, and click Create.

How do I launch storyboard in screen?

storyboard to configure your launch screen. If your project doesn't contain a default launch screen file, add a launch screen file and set the launch screen file for the target in the project editor. Choose File > New > File. Under User Interface, select Launch Screen, and click Next.


2 Answers

A work around that seems to be working for me:

For a strange reason if I am downsizing the image then it is working fine. I had a full size image of dimension 2732x2732 and it didn't work. Reducing the dimension of the same image to 2400x2400 is working fine. I have tried with 2500x2500 and 2600x2600 but none worked.

Most importantly, every time I change the image I had to restart the simulator to reflect the updated image.

It didn't work on the real device yet. Like the simulator, I had to restart the device and then only it worked.

Not sure if it is something with the dimension/size of the image or with the reboot.

Further updates:

I uploaded the same build (with smaller image) to TestFlight and installed it on my device (basically updated from the previous version having large size image) and unfortunately the issue persisted :(

Now what I did is uninstalled the app and reinstalled it again from TestFlight. Issue still persisted.

Finally I had to delete the app, reboot my device and install the app again. This is when it worked fine.

like image 172
Saddam Akhtar Avatar answered Sep 20 '22 17:09

Saddam Akhtar


So here are a lot of good ideas, but I was able to finally solve the issue - it is more like a workaround. I needed to store the picture outside the Images.xcassets folder and then it started to work again. This is a very weird issue.

like image 43
Sylber Avatar answered Sep 20 '22 17:09

Sylber