Ios Launch Image wont delete - ios

Hi I have created an App but changed the Default.png image halfway through now it only loads the old one but in the summary page in xcode it shows the new image as being the default but in the simulator it loads the old image and on my iphone it doesnt load anything. it also wont let me delete it and re add it it still uses the old image or no image.
I have tried
cleaning the project
deleting it off the phone and simulator
its still the same

Make sure that you have deleted any other images titled "default.png" in the Project Navigator. To do so just right-click on the image and hit delete. If it isn't allowing you to delete it, rename it to something else besides "default.png". Hope you can solve your problem!

Have you tried renaming the image to be something other that Default.png? You can see details on how to do that here: http://developer.apple.com/library/ios/#DOCUMENTATION/iPhone/Conceptual/iPhoneOSProgrammingGuide/App-RelatedResources/App-RelatedResources.html

Have you tried checking the plist in xcode under icons? With me it happened to have 6 icons listed.
It also helps to do a reset contents and settings on the simulator.

Related

Launch Screen storyboard not displaying image

I'm trying to get an image to display as the launch screen from my Launch Screen.storyboard file, however the image never displays. I have labels that show up fine, but the image doesn't appear.
This is how the launch screen looks in the Launch Screen.storyboard file:
However when I run the app on the simulator (as well as on the physical device) this is what shows up:
As you can see, the label "Test" shows up fine, however the image does not display. I'm really not sure why this is happening and nothing I try seems to work. If anyone has any ideas of how to fix this it would be greatly appreciated.
After restarting Xcode, cleaning the build and a number of the other suggestions on SO about this problem. What actually fixed it for me was a hard reboot of the device. (I wasted over an hour on this)
I suppose it just goes to show that the old saying have you turned it off and on again is still true for the latest gadgets!
How to reboot iPhone XS or iPhone XS Max
Quickly press and release the Volume Up button
Quickly press and release the Volume Down button
Press and hold the Side Button until the Apple logo appears
I was messing around with this for hours too. But i found the solution now. You need to add the image to your project and also to the assets.xcassets via drag and drop.
Had the same issue, adding the image to the "Build Phases -> Copy Bundle Resources" fixed it for me.
Follow below steps,
Remove application from the device
Restart device
Build again
If not working, delete derived data. Xcode Preference->Locationtab->Derived data. Then do follow above steps.
Very frustrating. Solution that finally worked:
Do hard reboot of device
Delete app
Install app from Xcode
It happened to me and makes me crazy, beyond get me lose some minutes 'til I figure it out.
So, like was said before:
Import the desired image to your Xcode project (just drag and drop it)
Change its Constraints and Alignment
Update frames resolving Auto Layout issues
In the Attributes inspector tab menu (generally in right corner menu xCode), on Image view > Image, remove image extension (.png or .jpg) - that's the trick
On the design screen, it will not appear, but when you run your app, it will be shown.
I hope it can help!
At last, restart the phone works for me!!
I have spent hours on this issue. Had tried change the images name, delete the whole image assets, modify info.plist, restart Xcode and even tried to set all the attributes of the images(which you can tell how desperate I was).
After invested a lot of time, I got the solution:-
Step 1:- Quit Xcode
Step 2:- Delete the app from device/simulator
Step 3:- Restart your device (if you are using simulator then you have to quit simulator)
Step 4:- Clear all derived data
Step 5:- Clear Bin
Step 6:- Open Xcode and relaunch the app, it will work
I faced the same problem.
Add an new imageset to XcodeAssets.
Add images to to the imageset.
Add image view to launch screen and set your imageset as image
On Imageview's attributes inspector, uncheck 'clears graphics context'
Clean the build folder and run again.
This issue is related to the Assets.xcassets to fix it you must add the image as resource but not in the xcassets folder and then should work just fine
In my case, resetting content and settings for simulator fixed the problem.
After trying everything on several StackOverflow threads, here's what worked for me:
Use a .png
Do not include it in your Assets catalog. Add it to your project's hierarchy directly, as you would add any source file.
In the image view, load the image including its extension. Example: launch_app_image.png
(Might have to clean product or derived data to update, but I didn't have to)
It seems there is some problem with resource caching in xCode. Had the same problem, restarted xCode and everything works fine after that.
Restart your device and clear x-code derived data
I had that problem after adding image to project and shotdown the device the problem solved
Was changing the background image of the splash screen and the new image wasn't showing (react native project).
Following the answers from others.
I did all the below and it was fixed:
Clean build.
Remove app from simulator
Quit simulator
Restart XCode
Run app again
Well As of now there is retina device available and I ignored #1x image in Assets.xcassets.
In my case, I have app logo in Splash screen which is not visible when I run the application.
After wasting so much time I figured out that I only provided #2x and #3x images for that logo image.
This issue is resolved by adding #1x version of that image.
In my particular case, the splash screen worked for the simulator and other devices, but stopped working for one specific device. This lead me to believe that it was some caching data kept by xcode (v10 and iPhone 7 v12.1).
I deleted the derived data at: ~/Library/Developer/Xcode/DerivedData/ only emptying the folder contents, not deleting the folder. I then rebooted the mac and the iPhone and cleaned and rebuilt the project, and now it is showing up.
I'm not sure if all of this was necessary, but didn't want to waste any more time narrowing it down, so the above sledgehammer approach worked for me. But of course it always depends on your specific situation - mine was device specific; for others it could be the actual image or launch screen layout etc.
Actually, for some heavyweight images, it isn't a good situation to add them into images.xcassets, because the app loads images.xcassets lightweight images before launch. So I put splash screen images at the first root of load and then the issue has gone:
Create a new Group in the root of the project
Drag and drop your image inside of the yellow group folder
Rename it to a different special name
Back to your xib (or storyboard) file and address the ImageView to the special name that it is in step 3.
Clean and build again, then you can see your image.
Hint: You can create your ImageSet in the images.xcassets but place them in the root of the project.
Importing images as regular files worked for me. Don't add image from assets catalog!
You have to make sure that the file name of your image has a format like .png or .jpg at the end otherwise it will not work. Also, before adding your image, you have to make sure that the image file is in your "Assets.xcassets" folder within your project. This can be done with a simple drag and drop. Also, make sure when you've added your image to your storyboard that the image name in the top left also matches the real image file name. I would try looking into Constraints too. Hope this helps. Good luck with your App.
I tried so many things with this (this thread alone seems to have a million ideas and half of them are conflicting). The problem for me was that when I did things like restarting the device and Xcode, it would cause the image to show for a few sessions of the app, and then it would stop (I have no idea why, but WOW it was annoying).
After countless hours, I found that A.G.'s answer in this thread is the correct one. The one thing I was doing wrong was that I was creating a new image set within xcassets, but I was then still using the name of the image within the UIImageView inside of the storyboard instead of using the name of the image set.
To clarify, what you would do is create a new image set and name it something like "Launch-Defaults", and then add your images to it. Then, within the UIImageView inside of the storyboard, you use the image "Launch-Default" (not including an extension since there is none since this is an image set).
When you do all of that, the image should actually appear correctly inside of your storyboard. Some people say the image will display blank if you don't use the extension (.jpg or .png), but I assume that is because they are not using the name of the image set. Others say you need to use an extension like .png or .jpg, but the key is to create the image set inside of xcassets and then use that image set inside of the storyboard. When done correctly, there should be no funkiness like an image not showing up or the Launch Screen only working some of the time (requiring a reboot).
Just to add my $0.02 to this question; I got this solved by using PNG images instead of JPG/JPEG images.
After converting the images to PNG and crunching them to reduce the size a little, everything worked fine.
My issue.
Reason: I have renamed the images after dragging into Xcode.
Solution: Don't rename images after dragging into Xcode. It creates problems for understanding Xcode. Rename images before dragging/adding into Xcode.
Hope it helps you out!
I spent hours on this problem before finally realizing my mistake. When you add an image to a UIImageView, it will use just the name of the image. If your images are in a different folder than your storyboard, they will show up in xcode but not when running the app. You must add the appropriate file path prefix, for example, images/image.png. It will now appear as a blue question mark in xcode, but it will work in the app.
I faced the same issue. Tried different solutions for that but nothing proved to be helpful. I then realised that the image was not visible only when i directly installed the app into device and the app is still connected to the xcode. If i disconnect it and then open the app the image was visible as expected.
It might be a xcode bug.
I tried cleaning the project, removing the png, removing the constraints did not work for me.
I just made one more copy of the image and renamed the copy then deleted the old image and added the new image (Same, with name changed) i just gave that image and it worked for me.
Also i am not using the Assets.xcassets, using the image in a folder.
My first mistake was, that I created a normal .storyboard, renamed it and defined it as launchscreen in the project settings. I this case I had image problems. It seems that some settings are missing in this case then, so I just created a new file via file->new and picked directly the "Launch Screen" and then it worked.
Also I had in mind that, that layout constraints are not supported in the launchscreen for some reason. Maybe it was like that in the beginning, not sure, but now constraints should work.
Maybe this helps anyone.
In my case, it was a bit more than just rebooting the device.
My launch image was stored in other Assets (Other Pods).
Had to move the image to App project's Assets.
And then rebooted my device. (Check simulator first, it should work).
Then it worked.
Images can be in format png/pdf, single scale or not doesn't matter.
I was stucked into same issue thanks to the below reference I am able to resolve the issue
https://developer.apple.com/forums/thread/19759?answerId=75438022#75438022
Though it is not necessary to change the image name and removing the extension while selecting the image for imageview, I simply created one folder named resources and added my image inside that folder coz I thought it would be not good to put images directly into the root folder
Hope this would help.
Happy Debugging!

UIImageView missing images in Launch Screen on device

I have an app that supports iOS8 and later, built in Xcode 7 and I am using a XIB for a Launch Screen (I do not have launch images). The view contains a single UILabel with the app version, and 2 UIImageViews with images that are both present in Images.xcassets: A logo and a splash image.
The UILabel and the logo image appear correctly when I launch the application, but the splash image does not if I run the app on an iPad Air 2 with iOS9. I have tested on an Air and a Mini running iOS8, and iOS9 simulators for iPad 2, iPad Air, and iPad Air 2 and the image appears correctly in all of those.
I ran some basic troubleshooting to see if I could figure out what is going on but I haven't been able to solve it and the only difference I can see between the image that's working and the one that's failing is when I added it to the assets...
Here's a rundown of what I know:
The UIImageView for the splash image is in the correct place, at the correct size. I can tell this because I set its background color to green just to make sure. The view is there, but the image does not appear. So I'm assuming that the view is not to blame.
Setting the UIImageView for the splash image to also use the logo image makes the logo image appear in the correct place for the view. This also leads me to assume that the view is not to blame.
The UIImage that I am using in the splash image view is used elsewhere in the app and appears fine in those other views (the logo image is also used elsewhere in the app and appears fine). So I'm assuming that the image is valid and having it appear in other views is not a problem.
I've confirmed that the settings of the UIImages for the logo and splash in the xcassets file are the same. They are set to Universal, Any width and height, multiple scale factors, rendered as default. There is one difference - the logo has 1x, 2x and 3x scales while the splash image only has 1x and 2x, but I have also tried using UIImages with only 1x, and 1x and 2x values in the UIView and they work (if they were added to the project some time ago).
Adding another image of a different size or format (PNG and JPG) to my xcassets and using that UIImage in the UIImageView for the splash image also fails to display.
Adding another UIImageView to the XIB file and allocating it a UIImage that was already in the xcassets works, the image appears in the loading screen.
Copying and renaming the image files used for the logo and adding them to the project then using that UIImage in the splash view also fails to display.
I have tried cleaning the project, restarting the development machine, and deleting the app from the Air 2 and reinstalling it just in case that was a problem.
These last three steps lead me to believe that there's some issue with images added after a certain point in the project file's lifetime. While I updated to Xcode 7 yesterday, the splash image was originally added in Xcode 6, but the logo image (also added in Xcode 6) was added some months before.
I've looked over the json files for the logo image and splash image and they appear to have the same format. I've also trawled through the pbxproj file looking for differences and I can't see any.
So I was wondering if anyone had any idea why the launch screen might not display these new images I'm adding on the Air 2 specifically? Other questions I've been reading through relating to images not appearing all seem to relate either to Launch Images, or to images in XIB files that have associated classes, neither of which seems relevant here.
Turn it off and then on again.
Seriously, restart the device — that’s what fixed it for me.
Here’s what didn’t work:
Cleaning DerivedData.
Cleaning the project.
Uninstalling the app from the device.
Restarting Xcode.
Restarting the computer.
Older observations:
Just like the others, it:
Works fine in the Simulator
Used to work on the devices (iPhone 5S, iPad Air)
No code changes (verified via git reset --hard HEAD), yet stopped working.
What I remember triggering the first build where it stopped working was unplugging the iPhone while it was runnning. (Not sure if it’s related.)
However, the git reset not fixing it (combined with all the clean steps not working) tells me it this must be getting cached somewhere else. Quite possibly in one of the .gitignored files? (I’m using Git ignore file for Xcode projects)
One workaround that worked for one UIImageView (in the UIView that has three) but not for the others was putting the image into an .xcassets file. Reverting to the plain image file did not undo the fix. (Really feels like a caching error.)
UPDATE: See top — restarting the device is what fixed it. I get the feeling the wrong bitmap data is being cached on the device itself.
Radar: http://openradar.appspot.com/23534818
"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."
No other solutions worked for me.
Got it from apple developer forum
I had exactly the same issue on an iPhone 6.
The very strange fact is that I was able to use another image from my images.xcassets which had the same size, compression, color space ...
I'm not able to find why it doesn't work but I found a solution :
Simply put your file outside your images.xcassets and use its full name (with extension) in Interface Builder
Hope this help !
The following sequence of operations fixed the issue for me on Xcode 7.3.1 and iOS 9.3.4:
Clean Your Build (⌘+⇧+K)
Close Xcode
Hard Reset iOS Device (Power + Home Button reboot)
Relaunch Xcode - let indexing finish and build on device once it is ready.
Many other answers suggest rebooting devices and / or rebuilding and / or reinstalling is the solution.
While these answers work for some of us, the reason these work is because the app is forced to "retake" or "rebuild" cached snapshots.
Cached snapshots are used by apps to present images before supporting data is loaded into memory, including the asset catalogue that contains storyboard images.
This SO 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 SO 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
/Library/Caches/Snapshots/<<app_bundle>>/downscaled/.
This process 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:
(old school) add an image file (.PNG) to your app's bundle (as you can see from the screenshot below I added the image file under the Supporting Files subdirectory in an Images subdirectory), and
reference that image in your UIImageView object in the Launch
Screen Storyboard file...
I was seeing the same problem. Rebooting the device (iPhone 6) and rebuilding the app to the device is the only thing that fixed it. I tried many other tips and suggestions but nothing else worked. Only reboot + rebuild helped.
My solution #iOS 11.x:
Use .jpg image instead of .png. I think image file size matters;
(Optionally) Put image file in project directory rather than .xcassets;
I had the same for app installed from TestFlight.
Delete app -> then restart iPhone -> then reinstall app works for me.
Just reinstall app or just restarting device didn't help.
What worked for me was to select Reset Content and Settings... from the Simulator menu
I was having the same problem, but restarting the device didn't help. What worked for me was deleting the UIImageView from my launch storyboard and adding a new one.
Have you tried turning the device off and on again? Do it.
Bring images out of Image.xcassets and add them again to project. It worked for me.
Remove app from mobile and then restart mobile and install app again. now the issues will be solved
I also had this exact problem in Xcode 7 with iPad and iPhone devices. Although it makes no sense, I was able to get around it most of the time by setting not only the Image but also the Highlighted image in the image view to the same image in my images.xcassets.
I use the iPhone 5s device, also meet this problem.
I fix it by :
Remove Drive Data
Clean the project
Restart Xcode
Remove the project from my device
Restart the 5s.
I think it's something wrong of Xcode to use memory, system may be allocate a little memory for Xcode cause Xcode drawing the lunch image failed (On my computer , Xcode have runned for several weeks without close)
it's worked for me.
First in xcode clean de project.
If you use the simulator, delete app and relaunch.
If you use a device, delete app and restart the device.
I think launchscreen only support image in Assets.xcassets.
Restarting Xcode did it for me.
What did not do it:
Clean build folder
Restart device or simulator (image wasn't visible on either)
Select the ImageView and then remove the image extension (.png or .jpg) in the attributes inspector tab > Image view > Image > Image Name.
On launchscreen.storyboard the image will not appear but it will be there in device. This worked for me.
It seemed a bug of iOS. Like sometimes the system animation disappeared.
Now I just reboot the iPhone and it is worked for me.
In my case I it was the image name.
I added an image named Default-568h#2x.png to LaunchScreen.xib - one of my old launch screens just for testing purposes. I was building on the iPhone X Simulator, the image didn't show up.
Changing the name to something neutral (MyImage.png) solved the issue.
It seems that the #2x was part of the problem as well as the -568h.
Which makes some sense on a -812h#3x device.
I have the same issue with imageView a launch screen storyboard. I removed reference of picture from project, I renamed my image and added it again to project. All works perfectly.
Also can 1. delete project image 2. change image name 3. add file image to project
It worked for me.
I had this problem in iOS 10 on an iPhone 6 and also in the Simulator. My image was in a folder and that seemed to be the issue. I removed the image from the folder in Xcode and put it in the project's base directory which solved the problem.
I experience the same. I change image resolution from 300 pixels/inch, change it to 72. It works for me.
Next helped to me:
change "Launch Screen File" to another xib
run the app
change xib back
Also very important: check that your is xib not opened in another tab, that can cause it as well!
I found a simple but radical solution that worked for me :
1 - Delete the file : LaunchScreen.storyboard and move it to trash.
2 - Product -> Clean
3 - Create a new launch screen file named : LaunchScreen.storyboard and put your images in it
4 - Save and build
That worked for me after trying complex methods for hours... It seems that my LaunchScreen.storyboard was write-locked and couldn't be saved or a weird caching process was blocking it.
This is too important
Must be empty! Launch Screen File
Image name is the problem.
Rename the image name used inside the Launch screen storyboard.
Make sure not to use any character other than alphanumeric ( don't use "_-&#")
Worked for me like a charm..
SOLVED!
The only thing that worked for me was deleting the ViewController from LaunchScreen.storyboard and create a new ViewController set to
Is Initial View Controller
Simple as that :)

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

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?
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.
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
This is too important !
should be empty ! Launch Screen File
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:
Create splash image assets (name as LaunchImage) there in
Image.assests folder.
Select LaunchImage asset in Launch Image Source option.
And Clear the text in Launch screen File option.
Clean and build.
Below is the reference image for right configuration:
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...
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.
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)
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.
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
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://stackoverflow.com/a/43592662/3445278
Close the simulator & open it again worked for me
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) :)
I've just spent a little while on the same problem, but found the answer, and put it into a Youtube Tutorial
Create your ArtWork Image. 1024x1024 that conforms to Apple's requirements for Appicons and LaunchImages
Set up a folder to hold your newly created Assets.xcassets
Open Asset Creator Pro and drag your new image into it.
Do your app icons first, putting the created file into your new folder.
Using the SAME image, select LaunchImages next, and "Append" the created set into the new, existing Assets.xcassets
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.
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.
check what's in the cassets, you should see your new images.
Make sure the line Launch Screen File in your Project settings is BLANK.
Make sure your LaunchScreen storyboard is BLANK. Anything in there and the images wont load.
test it.
Watch the video.
should be empty ! Launch Screen File
it worked for me
Its working fine for set Launch Image:
Go to setting app General section in xCode.
Scroll down to App Icons and Launch Images.
Check Launch Screen File in settings page
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.
Close the simulator & open it again worked for me
Clean Build Folder
Close your xcode and reopen it
Adjust constrain for the UIImageview
Check Launch Screen File in settings page

Launch Screen not displaying iOS 8

I'm trying to get the Launch screen to display instead I get the default black screen.
I remember I've had this issue in the past and is something really silly but I can't remember what it is.
I have a LaunchScreen.xib. I've set in my target -> info to use LaunchScreen and not image catalog. I am running iOS 8 and using Xcode 6.1. I tried on all iPhone simulators and iPhone 4s.
I can't think what more info to give than that.
For those who are still looking for another answer here's what worked for us:
Our launch xib only contains an imageView in the middle of the view. For some reason the image never showed (but the view was there, checked it with changing the background color).
The solution was to move the image file out of the image catalog and just drop it in the project as a standalone file. Pretty strange considering when we tried other images from the catalog they appeared correctly but not this one. Anyway, I hope this helps someone!
I had the same issue.
Turned out that I had earlier tried to attach a viewcontroller file with the launchscreen. To fix:
Go to launch screen
Click Connections Inspector in right pane
Remove all connections.
Accoring to #doctorBroctor: also go to the File's Owner tab and remove the connections there.
Go to your launch screen
Go to file inspector
Check the checkbox for "Use as Launch Screen"
I have tried with:
Deleted Launch Screen File.
Tapped on Use Asset Catalog in Launch Image Source and added Splash screen Images as desired in the image asset.
Deleted Previous Project on Simulator or Device. Clear the Project.
Run Again and it is showing now.
One reason for why you might experience the black screen instead of your launch screen is that the .xib file might not get copied in your build phase. At least that was my issue that caused my app to show the black screen even though I had done the steps you describe.
So, double check that your LaunchScreen.xib (or whatever it is named) appears in:
Your target -> Build Phases -> Copy Bundle Resources
And if not, make sure to add it. That resolved my issue.
For me the problem was that I hadn't selected the LaunchScreen.storyboard in the General tab of the project settings.
I've experienced the same issue. The solution for me was simply delete the app, reboot the device, then reinstall it. I think iOS caches the Launchscreen, and this cache is not invalidated every time when it should be.
I had the same issue in iOS 9 as well. Deleting the old app in simulator alone is not enough. Simulator has to be quit launched. It worked for me.
I fix it by select the "is Initial View Controller" in storyboard.
Make sure to delete the installed app from the emulator. Then run the app again from xcode (product->clean, product->run).
That worked for me.
I've looked at all the above answers, it helped a bit. Especially the answer by Suragch put me in right direction.
The LaunchScreen.storyboard isn't showing up, even after applying simple background colour to the view and removing the image.
Firstly, I cannot see the "LaunchScreen.storyboard" as shown in the image
This was because, some reason the LaunchScreen.storyboard wasn't added to the build Target.
Solution: Ensure the LaunchScreen.storyboard is included to the build Target.
Also, Choose the LaunchScreen.storyboard from the drop down as shown in above pic.
I hope it helps someone!
I found this old post 'cause my launch screen WAS working, then it stopped. I thrashed around for a good while and then realized this, undocumented problem:
If your launch XIB or storyboard file has a UIImageView with an image whose name contains a space, the entire screen won't load.
I only had a centered UIImageView in my LaunchScreen.xib that contained an image (.png file), and had the same black screen showing.
I removed the image (the .png file) from the project, added it again with new name, and used the new image.
Make sure to use empty Launch Screen File, then Xcode would use Launch Image Source.
Make sure you have "is initial View Controller" checked in interface builder.
I tried pretty much everything else but this finally fixed the problem and now it works in simulator as well as the device.
New feature in the iOS 8 SDK: you can now use a storyboard scene in place of your app’s launch images.
Create a blank storyboard file named LaunchScreen.storyboard.
Go to your target settings and, on the General tab, select the storyboard as your Launch Screen File. Xcode will add a corresponding UILaunchStoryboardName key to your app’s Info.plist. When this key is present, Xcode will prioritize it over any launch images you might have set.
Add a view controller scene to the storyboard. Add some subviews to the scene and position them with constraints. When you launch the app on a device, the OS should use the scene as the launch screen.
For more information check out this blog post by Ole Begemann "Replacing Launch Images With Storyboards".
Reset Simulator working for me
For iOS 14 and newer:
Device > Erase All Contents and Settings...
For iOS 11 and newer:
Hardware > Erase All Contents and Settings...
For previous versions:
Simulator > Reset Content and Settings...
Your launch image should be a PNG. A JPEG may work under certain targets, but you should use PNG anyway.

App Icon not showing up, although I have added in Xcode 5

I have added the icon as shown in the pic below but I am still not seeing the icon in my device or simulator.
This might be an XCode 5 bug that the added icons are not actually included in the app bundle, but you can work around it by going to Build Phases, expand Copy Bundle Resources, then press the "+" sign in the bottom to manually add the icon files to this category.
In addition iOS 5/6 seems to have a bug that the screen doesn't update the app icon even if the icon files are included in the bundle. To work around it (as suggested by josema.vitaminew at App Icon not changing when app version is updated in iOS 5 simulator) you can drag the app icon into a folder, then iOS will update the appearance of it.
If using the Asset Catalog, it might be worth also checking whether Images.xcassets holds all your targets as shown in the below image.
Expanding on adp's answer, if anyone has switched to asset catalogs but they stopped working, and still can't find a solution for Asset Catalog, Images.xcassets, AppIcon or LaunchImage not working, here is a reproduction of the same problem I encountered, and the solution:
I had upgraded to Xcode 6 and opened a project created by an earlier version (4 or 5, not sure) and no matter what I did, AppIcons and LaunchImages absolutely would show up when I ran the app in either iOS Simulator or the device.
I tried Xcode->Product->Clean, Xcode->Window->Organizer->Projects->Derived Data->Delete..., relaunching Xcode and the iOS Simulator, then rebuilding and relaunching the app (failed).
I tried "Reset Contents and Settings..." in iOS Simulator and even deleting ~/Library/Developer/Xcode/DerivedData//Build/Products/Debug-iphoneos and relaunching the app (failed).
I tried archiving the project, hoping that it was just an issue with the iOS Simulator, but the icon in the Organizer-Archives window was still shown as the default white square with lines, confirming that the icon would also not show on a device (a helpful trick to have when no device is handy). (failed).
I tried choosing "Don't use asset catalogs" in Target Settings and creating a new AppIcon-2 and LaunchImage-2 (failed). -this is what cost me at least 2 more hours, because this should have worked and the fact that it didn't revealed the bug in Xcode but I just couldn't see it-
I tried creating a new project from the single view template and compared all of the Info.plist settings (failed).
I tried comparing the new project's Contents.json with mine in Images.xcassets (failed).
I tried dragging the images from the left sidebar Navigator into the AppIcon image wells, hoping that they were just not being copied in a build phase for some reason (failed).
Finally in exasperation at the thought of having to create a new project just to fix the icons, I tried deleting Images.xcassets in the left sidebar Navigator and choosing "Move to Trash", then quitting Xcode and relaunching in case it cached anything. Then when I went to click the App Icons Source popup menu, it only showed "Don't use asset catalogs". I had to select it in order to bring back the "Use Asset Catalog" button. Then I was able to create new AppIcons and LaunchImages, drag images to the wells, build and launch the app in iOS Simulator and finally see icons appear properly.
So the problem appears to be with how Xcode stores Images.xcassets inside the project, and not with target membership, derived data, or anything in Images.xcassets itself. You must remove your assets file and create a fresh one, then drag images to wells by hand again.
It took me 3 hours of research to solve something that should have "just worked" and the entire process of having to manually create individually sized art assets has been so tedious over the years that it has personally cost me countless hours of busywork.
Hopefully this bug workaround helps someone avoid the frustration I went through. I can't help with the friction of manually sizing art assets, but I highly recommend the Icon Slayer website to automate that (of which I have no affiliation).
I have encountered the same problem when the project is switching from xcode5 to xcode6 . The solution is just click on the icon in the image asset,open the right panel , just tick the iOS version option in the panel,add the icons that are blank run it again ... It worked for me
I want to add my solution, where the problem is only isolated to the iPad, my app icon will not show only for iPads. After trying all the solution above, and I looked in the info.plist and found this flag that was not there before the problem with iPads. A new key/value has been added called "CFBundleIcons~ipad" without my knowledge and had nothing as it's value. Removing the key helped resolve my issue.
According to Apple Docs, the icons must be placed on the root level of the app files.
IOS/Xcode will not go under directories to search your image.
Solution is to move the images onto the root of your application i.e. where your source files are, or you can create references in the same way.
Regards
Heider
In my case, I just needed to clean and rebuild my project.
I had the same problem and after a couple of hours finally I could resolved it, copying an old -info.plist from one of my backups project and replace it, this works fine for me.
Regards
My issue ended up being I had used jpg images, rather than pngs.
For me, it was a much simpler solution than the others listed here. I had simply got the assets the wrong size. I had not paid attention to the multipliers that are necessary (e.g. 2x or 3x) and therefore the build was generating a warning for the incorrect asset sizes (which I had ignored). In my case, I corrected the image sizes and voila they appeared in the simulator.
For a macOS/OSX application, you also need to always add a 128 pixel size (and 2x), you can not only use a 512 pixel size and expect it to size down.
If your app icon has any transparency then it won't work. Check it!
I had all the images in the relevant folders and when I right clicked on the empty icon image in Images.xcassets/AppIcon and chose show in finder it would find the image correctly and show it, but for whatever reason it wasn't adding correctly to the project.
After trying a lot of different things above I simply dragged the images from finder into the AppIcon area and it worked.
If you are using cocoapods be sure to check this answer from a related question. After many lost hours, this is what fixed it for me.
https://stackoverflow.com/a/46349476/1343140
Xcode 9.3:
Open your project and add AppIcon images.
Click on general, go to "App Icon and Launch Image"
Click "App Icon resource" and add AppIcon (In my case it added AppIcon-1, so you can use that on rename that and do above step again).
In my case, I updated Build Rules > Using > to "Asset Catalog Compiler"
instead of any custom script and it worked for me.
I had this issue. Following the steps everyone provided did not help. However, it was because of my own ignorance. I had an issue with duplicate resources being created and one of the suggestions was to remove items from copy bundle resources. Well, it never mentioned that the asset folder was required to be in there so I deleted it. After fighting with this issue for 5 hours and recalling that it use to be in copy bundle resources I added it back and the app Icons worked.
Xcode copy bundle with appropriate file included.
make sure you create your appicons with an image 1024x1024
make sure you set 'app icon source' (project > general > App Icons and launch images) to the appropriate icon folder.
make sure you have not deleted the copy bundle resource for said app icon folder like i did.
cocoapods has a forum for a specific issue if all else fails.
Hope this helps.

Resources