Launch Image not showing up in iOS application (using Images.xcassets)
Asked Answered
H

15

37

I'm having some trouble getting my launch image to show up in my application.

I have created all the static image files in the Images.xcassets file in an asset set called "LaunchImage".

I noticed that my project also contains a LaunchScreen.xib file (which was automatically created by Xcode).

This .xib file appears when I run the application on my iPhone6 device. It doesn't appear in the simulator for iPhone4s (which makes sense, since xib launch screen is only for iOS 8 +).

I want to use the static images that I have created since they fall under the Apple Guidelines and go with my application. However, I haven't had any luck at getting it to show up.

I noticed under the project settings that there is a section called App Icons and Launch Images. I see how the .xib is connected by the Launch Screen File option I assume.

However, there is an option called Launch Image Sources. What does this do?

I found this: http://matthewpalmer.net/blog/2014/09/10/iphone-6-plus-launch-image-adaptive-mode/. However, it didn't explain anything about the Launch Image Source option.

There is a button next to the Launch Image Sources called "Use Asset Catalog". When I click it, it just says Migrate Launch Images to an asset catalog. Your existing launch images will be copied into a new image set. Choose an asset catalog to use: .

This is confusing to me because I've already created my asset catalog and I definitely don't want it to overwrite images.xcassets file. So, how do I link this to the Launch Images Asset Set that I already have created? Also what "existing launch images" is it referring to will be copied into a new image set?

Thank you!

UPDATE 1

So, I tried the migrate images option and chose to the new set option. This caused a new image set to be created which I deleted. However, the name left in the Launch Image Source was set to LaunchImage which somehow connected to the image set that contains my launch images. It did mess up my LaunchImage set -- the images were set to unassigned. I deleted them and dragged my files to the appropriate box in the LaunchImage asset set. However, when I run the application it still doesn't work. =( Launch Image doesn't show up.

I even removed the information that was in Launch Screen File (which my assumption was the setting that connects to the .xib file). Still, somehow the .xib file appears on my iPhone6 device. =(

Any ideas what's going on?

Hegira answered 31/12, 2014 at 16:13 Comment(0)
H
51

I finally figured it out!

So, in your project settings, go to the section that says: App Icons and Launch Images

Remove the information found in Launch Screen File if you do not want to use .xib file.

Then, in Launch Image Source, Choose to migrate and if you have already created your LaunchImage file and added the images to it. Then click the asset catalog that shows up. The name of the one that contains your Launch Images.

This will create a new Launch-Image2 in your image set. To use the one you already have created, click the drop-down menu next to Launch Image Source. And you should see your other Launch Image set. Choose it. Then re-build your application and run it. You should see your Launch Image. =)

Hope this helps!

Note: it won't delete your images that you already have in the asset catalog. It will just create a new LaunchImage asset set.

Reference: https://developer.apple.com/library/ios/recipes/xcode_help-image_catalog-1.0/chapters/StoringAppIconsandLaunchImagesinanAssetCatalog.html

Hegira answered 31/12, 2014 at 17:46 Comment(3)
I cant seem to get rid of the "Powered by React Native" still even though I have removed the information found in Launch Screen File so it is blank and does not show the .xib file. It still seems to use it. If I delete it, the build fails and says it cant find the .xib file. What am I doing wrong here?Bumble
@Bumble I left the .xib file in my project. I just don't use it. It's not configured in my build settings to use it. Did you remove the setting that connects it in "Launch Screen File"?Hegira
After done with the above changes and then still you are not still seeing the changes (launch screen) please try reinstall app will work.Fourflusher
I
57

I had this problem. I tested on simulator. I left the "Launch screen file" blank and removed the line about the "launch screen file" inside the plist. I restarted Xcode. Nothing. In my case in was not black it was white. Xcode 7 target ios 9.

i read this one as well: Launch Image does not show up in my iOS App

The launch image only showed up when i deleted the app from the simulator and run the app again.

Indeliberate answered 5/2, 2016 at 15:59 Comment(2)
For real device need also to restart the device.Bloodline
@Bloodline I had the same problem in xamarin.ios . Your answer helped me to solve!!!Parol
H
51

I finally figured it out!

So, in your project settings, go to the section that says: App Icons and Launch Images

Remove the information found in Launch Screen File if you do not want to use .xib file.

Then, in Launch Image Source, Choose to migrate and if you have already created your LaunchImage file and added the images to it. Then click the asset catalog that shows up. The name of the one that contains your Launch Images.

This will create a new Launch-Image2 in your image set. To use the one you already have created, click the drop-down menu next to Launch Image Source. And you should see your other Launch Image set. Choose it. Then re-build your application and run it. You should see your Launch Image. =)

Hope this helps!

Note: it won't delete your images that you already have in the asset catalog. It will just create a new LaunchImage asset set.

Reference: https://developer.apple.com/library/ios/recipes/xcode_help-image_catalog-1.0/chapters/StoringAppIconsandLaunchImagesinanAssetCatalog.html

Hegira answered 31/12, 2014 at 17:46 Comment(3)
I cant seem to get rid of the "Powered by React Native" still even though I have removed the information found in Launch Screen File so it is blank and does not show the .xib file. It still seems to use it. If I delete it, the build fails and says it cant find the .xib file. What am I doing wrong here?Bumble
@Bumble I left the .xib file in my project. I just don't use it. It's not configured in my build settings to use it. Did you remove the setting that connects it in "Launch Screen File"?Hegira
After done with the above changes and then still you are not still seeing the changes (launch screen) please try reinstall app will work.Fourflusher
E
33

This is too important !

should be empty ! Launch Screen File

enter image description here

Eire answered 7/9, 2016 at 11:32 Comment(2)
In addition to this, also clean and rebuild your project and delete and reinstall the app to the device. First I tried only putting an empty string here and it didn't work yet.Klingel
In this page You can select the Launch screen storyboard or otherwise select the Create your Launch screen Xib file.Chufa
A
15

Working solution. Saved my time and hope it will save yours as well.

  • Make sure your images are accurate size according to Apple Guidelines.
  • Make sure, You will select only one option , either launch screen file or Launch Image Source. You can find these two options in Project build settings -> General

Clean and build.

Recommended solution step by step:

  1. Create splash image assets (name as LaunchImage) there in Image.assests folder.
  2. Select LaunchImage asset in Launch Image Source option.
  3. And Clear the text in Launch screen File option.
  4. Clean and build.
  5. Below is the reference image for right configuration:

enter image description here

Atabrine answered 23/10, 2015 at 6:24 Comment(6)
make Sure after removing the launch screen file clean build and mainly Reset simulator.Furlana
@Furlana thats the point! Reset the simulator and do clean, simply deleting the app won't make any difference. TnxCoontie
Removing Launch Screen File name from target > general removes entry Launch screen interface file base name from info.plist so this will be the trickEuryale
I tried something similar, but it didn't work: #43168645 Any idea why? Thanks very much.Transpierce
@VaddadiKartick Reset your simulator and try again. And best if you can check if its working on real device or not.Atabrine
Questions: 1. Why there is no "Launch Image Sources" dropdown in my Xcode (12.4) ? 2. There is no dropdown options for "Launch Screen File". Is this normal ?Illinois
H
2

I had this problem in XCode 9.4.1, turned out to be caused by the assets folder not being included in the Bundle Resources. Select the project, then your target. Go to 'Build Phases' and open up 'Copy Bundle Resources'. If the .xcassets group you want to use isn't listed then just drag it in from the file browser.

Worked for me...

Havenot answered 12/9, 2018 at 12:24 Comment(0)
E
2

After few hours of unclear answers:
1) go to setting app General section in xCode.
2) Scroll down to App Icons and Launch Images.
3) Clear Launch Screen File (just leave it blank)
4) Set Launch Images Source to LaunchImage (remember to create them in Assets.xcassets)
Now app will use images You set in LaunchImage.

Electrocardiograph answered 28/5, 2019 at 10:23 Comment(0)
N
1

Had a similar issue today. Tried to let xCode create automatically the Asset, but it was always unassigned.

The solution was to create manually the Launch Image in the ImageAsset and assign the files for his respective resolution.

It looks like xCode created a different type of Launch Image asset, so it didn't recognized the asset (v8.3.2)

Nudge answered 4/1, 2018 at 19:8 Comment(0)
P
1

Solved! I've tried a lot. The problem was that the launch image shows in simulator and didn't show in real device. I got a Storyboard with UIImageView in it. Strange was that old images worked, and images, that i did add recently not. First i thought that this is a problem with assets. No. Than i checked color profiles and did a lot of tries with different profiles: left-working image, right-not working. Didn't help. enter image description here

Then i started google and found this thread

Main solutions from here:

1) Didn't helped for me.

Change image property of my launch image using Preview app: [ Tools --> Assign Profile... --> ColorSync Profile: <> ]

2) Helped

Even deleting the app and re-installing from XCode doesn't work. However, changing the bundle ID does work. With no other changes, the existing bundle ID shows no images, but the new bundle ID shows them all correctly. I'm doing that as a temporary work-around, since a previous post in this thread suggests that installing the builds via TestFlight doesn't encounter the problem.

3)

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.

4) Helps but old and rude

Taking the images out of the asset catalog fixed the problem for me. I just added the @1x, @2x, and @3x image used on my launch screen to the project the old way and it seems to be working fine. Trying to confirm it through TestFlight now, but iTunes Connect isn't behaving at the moment.

I thought this is an iPhone cash problem. So you don't need to warn about it thus the image will show when installing with testFlight. After this conclusion i did next and that worked:

1) Uninstall app
2) Reboot phone
3) Build app to the phone

Purposive answered 12/4, 2018 at 17:12 Comment(0)
Q
0

I just figured this out. My launch image was not showing up, I get a white screen when launching on a device (iPhone 6, 7+) or testFlight. Fix: Renamed "Landing_screen.png" to just "Landing_screen" removing .png part. https://mcmap.net/q/109565/-launch-screen-storyboard-not-displaying-image

Quick answered 24/4, 2017 at 16:17 Comment(0)
T
0

Close the simulator & open it again worked for me

Tolerance answered 29/6, 2018 at 10:17 Comment(0)
R
0

I have face same issue.

In splash screen image is not displaying but other thing like label and view are showing up correctly .

To fix issue first verify all of the above settings in your code. If nothing works then Restart the iPhone solves my problem.

Hope it is helpful to someone here (Happy to help) :)

Rafferty answered 4/4, 2019 at 11:22 Comment(0)
B
0

I've just spent a little while on the same problem, but found the answer, and put it into a Youtube Tutorial

  1. Create your ArtWork Image. 1024x1024 that conforms to Apple's requirements for Appicons and LaunchImages
  2. Set up a folder to hold your newly created Assets.xcassets
  3. Open Asset Creator Pro and drag your new image into it.
  4. Do your app icons first, putting the created file into your new folder.
  5. Using the SAME image, select LaunchImages next, and "Append" the created set into the new, existing Assets.xcassets
  6. Open your XCode project, and delete the eisting - probably empty - Assets.xcassets folder. If you have other files in it, then just delete the Appicons and Launchimages sets.
  7. Drag your newly created Assets into the XCode project, making sure you set the option to Copy the files. Sometimes this can be off! beware.
  8. check what's in the cassets, you should see your new images.
  9. Make sure the line Launch Screen File in your Project settings is BLANK.
  10. Make sure your LaunchScreen storyboard is BLANK. Anything in there and the images wont load.

test it.

Watch the video.

Barley answered 17/4, 2019 at 16:11 Comment(0)
C
0

should be empty ! Launch Screen File

it worked for me

Citrine answered 4/11, 2020 at 9:55 Comment(0)
C
0

enter image description here Its working fine for set Launch Image:

  1. Go to setting app General section in xCode.
  2. Scroll down to App Icons and Launch Images.
  3. Check Launch Screen File in settings page
  4. Set Launch Images Source to LaunchImage as storyboard file(Set image in Launch screen) (or) You create a own launch image Xib file.

Note: Now app will use images You set in LaunchImage.

Chufa answered 8/11, 2022 at 10:29 Comment(0)
S
0
  1. Close the simulator & open it again worked for me
  2. Clean Build Folder
  3. Close your xcode and reopen it
  4. Adjust constrain for the UIImageview
  5. Check Launch Screen File in settings page
Sorb answered 3/2, 2023 at 5:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.