0
votes

If followed these instructions: https://docs.microsoft.com/en-us/xamarin/ios/app-fundamentals/images-icons/launch-screens?tabs=macos

The LaunchScreen never shows up. I am using VS2019 for Mac current build. Followed all instructions to the letter.

Update:

github sample project as requested.

https://github.com/tpitman/Xamarin-Forms-SplashScreenTest

I created a new cross platform forms solution. I downloaded an image of the Xamarin logo. The project already has a LaunchScreen.storyboard. It also already had an image view object, but I deleted that and added a new one because the steps on that link above said to add one. I also added the label just like those instructions say.

You will notice when you run it that the label shows up, but the image does not. That is the problem. In my app I don't have or need a label. I just have an image I want to show.

Update 2: I deleted the above repo. Created a new project including Android this time (not sure that matters, but it represents my real situation).

I also changed the image I used from the stock one to my own in case that matters.

I then built it and it does NOT work as the original one didn't. Hopefully it won't work for you as well.

I also created a video of it not working. Here is the link to that video:

https://drive.google.com/file/d/1Uy0KfDq0_5IfrqDDaMVDNeGylibzUH5m/view?usp=sharing

Update 3: In the end I am not sure what fix it. I removed and reimported the images. I have 3 projects and 2 of them work fine now using the Assets.xcasset method and the other one I couldn't get to work that way, but works with the images being in the Resources folder.

I think one thing that I did that seemed to make a difference was I did a clean and then build and that seemed to fix it.

1
Hi, could you share a sample project link here? I will check that in my visual studio.Junior Jiang
I will see if I can come up with a sample project that does this. I would assume it would just be to follow the guide in that link I included.user856232

1 Answers

0
votes

I have checked the shared github sample project, it works in my local site. Both in VS for Mac (8.8.4) and VS for PC(16.8.3).

enter image description here

==================================Update================================

There is a workaround to solve that, you could add Image to Resouces directly.

enter image description here

Then use it in LaunchScreen.Storyboard, then it will show:

enter image description here