I'm using Xcode 4.3.1. Adding launch image is pretty simple -- just drag the image to the Project->Summary->Launch Images window.
So I set a launch image before and it worked. But when I dragged a different image and run the app on my iPhone again, the launch image still remain the same as the old one. Even after I delete the launch image from the Launch Images window, the old image still shows up upon launching.
I've tried clearing the build as well. Didn't work.
Help please. Very much appreciated!
I had the same issue, but with launch storyboard. I had to rename the image I've used as a background.
Deleting from the device didn't help with Xcode 4.5.1. The build process is caching the image. With a hint from Zorayr's answer to related question "Xcode, can't remove “Launch image” from project," I decided to track the cached image down and destroy it, so it wouldn't keep being built and showing up in my test App.
Eventually, I found that Xcode (at least 4.5) builds the images by default in the following path off your home directory:
~/Library/Developer/Xcode/DerivedData/<ProjectName>-<uniqueID>/Build/Products/<Scheme>-iphone{os,simulator}/<ProjectName>.app/
So in addition to removing the old App image from the device (or simulator,) you also need to remove the image file(s) from the build cache. But just doing something like
rm ~/Library/Developer/Xcode/DerivedData/MyProject-fpwnjlbayydgzxcdlyrwxrwntapr/Build/Products/Debug-iphoneos/MyProject.app/Default*.png
won't always solve your problem. Instead, you might get a strange error in a popup window saying something like "Signed product moved or deleted." (I can't reproduce it right now to get the exact text.) It doesn't show up in the log file, and it just hangs the build process (in Xcode 4.5.1.) To get around that, I deleted all of the files under the <ProjectName>.app/ directory tree and the sibling directory tree <ProjectName>.app.dSYM/ containing (seemingly) the symbol tables and signature files for the parallel products. The build process will then re-create everything with no more complaints.
What worked for me on iOS 10.2.1, iPhone 5s hardware test device, Xcode 8.2.1
I think it has nothing to do with Xcode. The test device appears to be caching the LaunchScreen.storyboard image. I needed to reboot my device by holding home + top button. Then I rebuilt, low and behold, the image updated.
You should delete the app from the device, then launch it again.
Quit the simulator and then run the project again.
For device, as mentioned in other answers, delete the app from the device and then run the app again.
Steps that worked for me in 2020 (xCode Version 11.4.1):
Delete derived data
Restart xCode
Delete app on device
Restart device
Clean rebuild and run
Except the last step, I think the order doesn't matter.
It's really annoying though and I'm not even sure if it always works.
Pretty pathetic on apple's side. Good luck guys!
If you were using an asset catalog, it can also help to delete the images from the Images.xcassets file, and then load them manually in General>Launch Images.
This is what worked for me
Put the new image in project folder
Run app on device/simulator
Put image in xcassets under a different name
Run app again and it works
I thought I would create an update for anyone who is XCode 10 (and possibly XCode 9) and experiencing a blank black or white screen after modifying a launch image.
In my case I had to create launch images for the iPhone XR, iPhone X, iPhone XS and iPhone XS Max.
Originally I just had a sample white launch image for testing. After creating my proper image for the XR and replacing the sample the change would simply never show (on the XR device). I would still get a white screen.
I tried all of these in combination and failed:
-deleting the app beforehand.
-deleting xcode derived data and cleaning the build.
-restart Xcode and the device and the computer.
-deleting any existence of the white launch image on the computer.
-manually editing the JSON in a new images asset with the correct file names
The XR device would continuously show a white screen and after meddling with the build setting and migrating back to image packs it turned to black.
Solution:
Ultimately it started working after I also replaced the white 'XS' launch image with a new one as well. Even though the device is an XR. This is an odd solution but solutions like this have helped with launch images throughout the years.
For me, quitting the Simulator and restarting it worked -- I can finally see the updated launch image. The note above from Emil Korngold triggered me to try this.
Related
I'm developing an tvOS app, and I'm trying to set the LaunchImage.
I've added a .pgn-file with size 1920 × 1080 called LaunchImage.pgn to Assets.xcassets, by dragging the file from finder to the LaunchImage image-socket in xcode. But the Launch Image doesn't appear when i launch the app.
In the target settings, under general:
From the Contents.json-file in /project-folder/Assets.xcassets/LaunchImage.launchimage:
I have tried cleaning the build folder, made a clean build, tried with different files with different filenames.
Any clues?
This seems a bit buggy, maybe someone has found a workaround?
I used Sketch to export the PNG. I exported a bitmap copy of a screenshot from the simulator, and it must have had some alpha channels. I didn't get any warnings in xcode.
I followed the solution presented in this post, and it solved the problem:
Export PNG without alpha
Thanks Daniel! :)
I don't know if its a bug in unity 5.3.1 personal edition or I am doing something wrong.
I once put a splash image which appears fine in beginning but now I have removed it, even deleted it from project/asset folder. Now when creating new build for iPhone/xcode, I don't know how but unity brings the same old splash image every time. I have tried changing the image. but it still shows old one. Even in xcode I can surely see the new image everywhere but on device, its always old one.
I have tried cleaning xcode project and deleting app from device.
I know this is an old question but we ran into the same problem just recently.
he fix for this issue is to uninstall your project from the device and restart it.
This causes the device to delete the cached launch screens (yes, iOS caches all launch screens). When you install deploy your app now, it should use the new splash screen.
Ok. So I have iPad app in Xcode 4.2 targeted for iOS 5.1. I provided it with launch images for both landscape and portrait modes and it has some serious trouble with using them properly.
First in landscape mode it shows proper landscape image but rotated by 90 degrees CW and cropped on the right side. Then when it starts to display it properly but does it also in portrait mode (as if it doesn't recognize portrait mode at all anymore).
I've seen some suggestions like providing portrait image with rotated content for landscape mode, etc. but the problem is I can't for the life of me make xCode use both images in right moments.
Is there some voodoo for that? Like setting them in proper order, use plist directly or the slots in GUI, putting them in some special directory or two different directories, I don't know - anything? Fighting xCode over such things will make me puke with blood one day...
Ok, one thing to know is that xCode seems to be very capricious when it comes to updating settings, resources etc. I deleted references to the launch images from the project, cleaned the product in xCode and removed the app from simulator but it still somehow managed to use the launch images even though it didn't show copying the images in build log.
I'm not sure if it took the pictures from derived data or what but I had to delete derived data and remove the images manually from the app bundle in ~/Library/Application\ Support/iPhone\ Simulator/5.1/Applications/ to make it stop. Then I pasted the images manually into the app bundle and now after publishing both images work properly in the simulator ignoring the fact that I didn't set them up at all in xCode!
I'm still not sure how to proceed with the device version - it obviously doesn't have the launch images now...
Apparently xCode doesn't care at all about setting anything about the launch images apart from including properly named images in the project so they get copied to the bundle. As I wrote above you can even inject the images into the app bundle and it still works.
The other side is that once you get the images there it may by hard to get rid of them.
So anyway now I have nothing in my plist about the images, nor anything in the slots in the Target Info and I have four working launch images in my app (both orientations and retina).
Hope it helps someone sometime..
I'm using Xcode 4.5, Cordova 2.1 , iPhone4 (IOS6). Adding launch image is pretty simple -- just drag the image to the Project->Summary->Launch Images window.
So I set a launch image before and it worked. But when I dragged a different image and run the app on my iPhone again, the launch image still remain the same as the old one. Even after I delete the launch image from the Launch Images window, the old image still shows up upon launching.
I've tried clearing the build as well. And I have try to delete the app in my devices.In the simulator it works well.But in my iPhone4(with ios6) it doesn't.I have tried this again and again.But I can't find the solution.
In before,I often use my images to change the default launch images in the folder.But this time,it doesn't work.
Does anybody know the solution of this problem?
You have to change these images in your project
Splash/Default#2x~iphone
Splash/Default~iphone
Either be sure to have the option of splash screen in Cordova.plist, AutoHideSplashScreen to YES.
But putting my images in the right format works fine.
For me it display firstly an image full screen, and then the image of splash directory.
"The launch image remains the same as the old one" - this is unfortunately not a Cordova thing, there's just something screwy going on with Xcode and your device. Try rebooting it. For the Simulator, sometimes it fixed it for people once they Reset the simulator as well.
Finally I solve this problem by myself.Follow these steps and hope that you would success.
1,Prepare your image files and add into the project folder.Remember that you should use xcode to add your files in to the Group.
2,Edit your info.plist file.Add a key -> "Launch Image" , Value -> "[Your File name]"; key -> "Launch Image (iPhone)" -> "[Your File Name]";
Try to test your project.If it doesn't work,you should edit your CDVViewController.m.(It is in the CordovaLib(Cordova Lib -> Classes -> Cleaver -> CDVViewController.m ).
3,Replace "Default" as your File name in CDVViewController.m
Ok.It works now.
(P.S where the default png files come from ... ? :-( )
I am testing my app on SDK iOS Simulator to make sure it runs properly. First of all, I decided to remove a splash screen image because I don't think I want one. When I ran my app again, it's showing the splash image again, thought I was a bit confused there, so I deleted the image from references and removed the image from the folder, to the trash. WHen I ran my ap again, it's still showing the same splash screen image again! I have no clue what's going on with my project now that the stupid splash screen image that I removed kept showing over and over again. Then I tried to run other project to see they are ok, but for some problem again, that same splash screen image that I completely removed is still showing up! Hopefully someone can Please help me resolve this situation quickly!
Clean the project (in xcode :-) ), remove any installed version of your app on the simulator (if you want, reset the simulator, it will be more efficient), go into the finder and with a rightclick on your xcode project, open the package and check if there are no included source file into it (.m, .h, resources, ...), including your image. If there are, move them out and update the needed one into your project. Then clean your project again in xcode, build, run.
Does this work ?
in xcode you need to do a build clean, then delete the app from the simulator, then build and run.
See Xcode- Deleted images appear in simulator. You can also try removing the app from your simulator and running it again.