Launch Storyboard not showing image when project builds to device.

I setup a Launch Screen Storyboard which has a logo for my app in .pdf vector. When I build the project image is not visible on device. Simulator works just fine. Tried on a few diffrent devices and the issue persists. Cleaned the whole project, deleted derived data, still an issue.


Image is getting pulled from Asset catalogue. Any ideas?

Same here, UIImageView only appears on Simulator !!


It seems to be definitely a bug, if you add Size Class Customization then remove them, the UIImageView appears again on device.

Hi,


I can confirm that this also happens to my project.


Details :

I use a LaunchScreen.xib file that has a couple of images and the Logo image centered. If ran on a device, the Logo image's not loaded, all other images are loaded. If ran on the Simulator, it works properly. I even tried putting the image to a different UIImageView element in the app and the image renders without issues.


Device :
iOS 9

iPhone 6


Additional fixes attempted

Replacing the image with a new logo

Issue persists.

Putting in another random image as the logo

The image renders fine (but there are other random images that do not render)


Hopefully we can get an answer about this since it completely blocks a release on the App Store.


Kind regards,

D6mi

I don't know if this will help anyone. I was having the same problem. I had several images on my launch screen that stopped showing up.


I did three things (the first two on their own didn't do it, but may have assisted the third which did work)


1) Copied all of the images to the root directory (same location as xcode puts the images)

2) Created a folder in Images.xcassets and put the images in there.

3) The images in the launchScreen.xib were originally called imageName.png. This was changed to just imageName (remove the file extension.


After the third thing the images appeared. I don't know if either of the first two steps are required, but hopefully it will help someone.

I had been experiencing similar issues for several hours. Then I thought about simply restarting the iPhone. Problem solved. 🙂

There has to be some caching related problem.

I also find this issue. It's XCode 7.0.1 bug,I also fix it without use images.xcassets.

The image can't show launchScreen.xib from images.xcassets.

1.you can copy the image to xcode project root path.

2.you must rename the image with the different name.

Wait so long and nothing change !


xcode **** 😠

A solution that worked for me: edit the image (with GIMP for example) and remove alpha channel from it.

Thank you. @buck. I just copied Image to xcode project root path. It was working fine now.

I was just having the same problem on my iPhone 6s running iOS 9.1 with an app I'm working on.


The solution for me was simply to make sure that the "Clears Graphics Context" box is unchecked for the UIImageView in the storyboard. Just changing this fixed it for me - I actually had another image in that same storyboard that had that box unchecked and it was already showing up.

I noticed the same problem sometime after upgrading to iOS 9.2 on my iPhone 6 and XCode 7.2. Your solution worked for me.

Yep, this seems to be a bug. Had the same problem, and i solved it by just rebooting both the iPhone and the Mac

Rebooting iPhone fixed for me too. Been struggling for hours on this... thanks

A StackOverflow answer by @jaga provides the solution, but not the reason, as to why UIImageViews are missing in the Launch Screen on device (but not in the simulator).


Background


Recently I attempted to use a custom font in my "Launch Screen.storyboard" file.


The reason I could not became clear after reading this StackOverflow answer by @TimCamber, which prompted me to do a little more research and testing.


The reason that a custom font is not included in my Launch Screen Storyboard file is the same reason an image within an asset catalogue is not included...


The app prepares portrait & landscape snapshots of the app's Launch Screen from your Launch Screen Storyboard file and (currently) saves it in your app bundle:


  • here /Library/Caches/Snapshots/<<app_bundle>>/;
  • and here /Library/Caches/Snapshots/<<app_bundle>>/downscaled/.


This process to prepare the launch screen is complete before any supporting files are loaded, including any custom fonts and the asset catalogue.


Solution


As mentioned above by following @jaga's solution, literally all that is required is to:


  1. (old school) add an image file (.PNG) to your app's bundle; and
  2. reference that image in your UIImageView object in the Launch Screen Storyboard file.

Example 1: Screenshot of Project Navigator in Xcode - image file added under the Supporting Files subdirectory in an Images subdirectory.


Example 2: Screenshot of Attributes Inspector in Xcode - Image View section detailing reference to the image file used for a UIImageView.

Thanks man, I didn't think about that, but indeed it fixed the issue!

Sadly, this still doesn't fix the problem. I had hoped this might be the issue because I do use a custom font on my launch screen, but the proposed solution did not work. The only thing that works is changing the name image file in the LaunchScreen.storyboard file from myLaunchImage.png to myLaunchImage. When I do this, the launch image shows up again. But as soon as I make a modification to the Main.storyboard, the launch screen goes black again. When that happens, I go back to my LaunchScreen.storyboard file and then change the image name again. This time I switch it back to myLaunchImage.png. This is maddening. Why would removing the image file extension (or re-adding it) temporarily fix it? And why is a modification of Main.storyboard impacting the display of the launch image.

Launch Storyboard not showing image when project builds to device.
 
 
Q