IOS Save the old startup screen and application icon after update

I have an application in which I recently replaced startup images and application icons, I deleted all old resources from anywhere in the project. When I upgrade the application from the old version to the new one, simply by embedding Xcode, everything is fine. However, if I have an old version of my application installed, then update it with TestFlight, every time I kill the application and then restart it, the old startup image will appear briefly before showing the new startup image. Similarly, when I close the application, the icon of the old application blinks briefly before returning to my new one.

I opened the application using iExplorer and noticed that the image of the old launch screen was saved in the old directory /Library/Caches/Shapshots (I don’t know how and why it got there). When I delete it manually through iExplorer, it stops appearing. However, when I try to delete it using code using the NSFileManager methods, I get an error saying that I am not allowed to delete files in this directory.

Has anyone come across this before and have any tips?

+124
ios objective-c cocoa-touch
07 Oct '15 at 21:37
source share
19 answers

I was able to reliably clear the springboard cache to test changes to the launch image by doing the following:

  1. Remove app from device
  2. Turn off the device
  3. Turn on the device, install and run the application.

The image is updated correctly every time. Sorry, I need to turn off the device to make it work - but at least I was able to make progress this way. Hope this helps someone.

In the case of a simulator, just restarting the simulator should work.

+249
Mar 03 '16 at 21:08
source share
β€” -

These caches are used by Springboard to quickly switch applications. This is not a problem that will affect your users and should theoretically go away the next time Springboard decides to take a snapshot of your application.

As they say, this is not a problem that you can fix. This is a bug in Apple code, not yours.

+34
07 Oct '15 at 22:41
source share

For the simulator, just Reset Contents and Settings...

+25
May 01 '16 at 9:29
source share

@InkGolem

This is not a problem that will affect your production users.

truth.

I ran into this problem when I changed my startup screen, SplashScreen and application icon. I tried every method, but it did not work. Finally, I just published my application and downloaded it from the application store from a device that I did not use for development . SplashScreen and the application icon work as usual !!!

+16
Feb 07 '16 at 5:08
source share

I found a solution to solve the problem if you really want to fix this problem. Apple has some mechanisms for caching startup screen images that are indexed by the image file name.

When you change the images on the launch screen, and you want to immediately see these changes in the next run. using the new name of the image whose image you changed and the link to the new image file in the storyboard or xib.

Run again, you will see a new change.

+11
Oct. 20 '16 at 5:56
source share

Uninstall the application, restart the phone and install the application again ... This is really fixed in my case.

+8
Mar 22 '16 at 6:44
source share

I also ran into the same problem. This is because the simulator / iOS device caches the startup image the first time the application is launched. I added some changes to Brian Trzupek's answer :

  1. Remove a set of images from Xcode resources (e.g. launch_image)
  2. Add a new set of images and add images to it.
  3. Turn off and on your iOS device. (Reset contents and settings for the simulator).
  4. Empty the Xcode build folder (press command + option + shift + K ).
  5. Remove the application from the device / simulator (if available).
  6. Run again.
+5
Nov 14 '17 at 13:28
source share

This worked for me: http://arsenkin.com/launch_screen_image_cache.html

Again, thanks to the branch to which I referred above, I found a way to solve this problem - name your new image differently than there before if your new one has the same name as the old one and put it from the * folder. xcassets to the project directory and reference it in your UIImageView. And that is it. It sounds stupidly easy, but oh my god, how much rage I had.

+5
Aug 08 '18 at 22:35
source share

Just connect your device, go to Xcode> Window> Device> Device, now in the installed applications, select your application, right-click and load the container, go to the generated file, right-click, Show package contents, AppData, Library, Caches and delete files. Now go to Xcode> Window> Devices> Your device> your application and right-click to replace the containers.

+3
Dec 18 '16 at 20:03
source share
  1. Delete your application from the device
  2. Turn off the device
  3. Turn on the device
  4. Install and run the application.
+3
Jun 14
source share

What did the work for me:

  • Uninstall LaunchScreen Scene and View Controller and create a new one (make sure you set it as "Initial View Controller" in the Attributes Inspector).

What didn't work for me:

  • Uninstall application
  • Reboot iPhone, Mac, or Xcode
  • Delete received data
  • Removing a device container
  • cleaning
  • Last Minute 3 Steve Jobs Voodoo Dolls
+2
Jan 22 '19 at 2:40
source share

Ok, so I understood the problem. In the previous version of my application, we used the XIB launch screen. Somewhere in the development of this new version, xib was removed and replaced only with static startup images.

The solution is to use the XIB launch screen. I noticed that the first time I used the xib launch screen, the file stored in the snapshot directory was replaced with an xib snapshot.

+1
09 Oct '15 at 1:07
source share

Honestly, I did not dare to start living, not being sure whether it would be updated or not.

So, if you use xcassets, a simple solution:

  1. Delete old image set
  2. Recreate one with a different name and add your splash image
  3. Update your storyboard to use this "new" image set link

This is sure to update! (I even tested with an application already installed on the device). There is no need to clear the device cache or so.

+1
Apr 30 '18 at 2:31 on
source share

Xcode 10 / iOS 12

After trying all of the above, I had to delete the image from LaunchScreen and replace it with a new one.

+1
Feb 28 '19 at 16:28
source share

This problem also has. Being a complete newbie, I naively changed LaunchScreen.storyboard to LaunchScreen.xib. The run failed (duh), so I changed it back to .storyboard, restarting the application to check that I did not screw anything else - and the old screen was not displayed at first. So, whatever I do, he must have flushed the old cache.

0
Feb 19 '16 at 8:10
source share

@Chino

@InkGolem

This is not a problem that will affect your users.

I ran into this problem when I changed my startup screen, SplashScreen and application icon. I tried every method, but it did not work. Finally, I just published my application and downloaded it from the application store from a device that I did not use for development. SplashScreen and the application icon work as usual !!!

Was a previous version installed on this device? I believe this is the same as the answers above about uninstalling and reinstalling or uninstalling, restarting and reinstalling.

I have the same problem with devices for development and production, with a simulator and from the application store. I was also able to recreate the problem using a simulator. First, I run the simulator with the previous version of my code, then I run the simulator with a later version. In both cases, the old start screen is transferred. In the simulator, deleting a snapshot does not work, since it is simply recreated. When you close the application by pressing the "Home" button, a new snapshot is created with an older startup screen. Now ... if I uninstall the old version of the application from the phone or the simulator and then install it using xcode or the application store, the launch screen is updated properly. However, this is not an ideal solution for end users.

Has anyone come up with a solution that does not include removing the previous application from the phone?

I tried: renaming the xib file to LaunchScreen. Rename images used by LaunchScreen. Adding a blank image to screen.window in applicationDidEnterBackground to hide the screen before the shot

Adding a break [application didFinishLaunchingWithOptions], I see that the old LaunchScreen appears before calling didFinishLaunchingWithOptions.

0
Jul 06 '16 at 19:54
source share

There was the same problem, but only with the image used in the storyboard on the start screen. Moving the image from the resource catalog with changing its name to the application bundle (for example, the old set of images in the resource catalog was called launch_logo, and the image in the application bundle was called launchscreen_logo.png) solved this problem for us.

0
Aug 07 '19 at 10:32
source share

This is the fastest way I found to solve this problem, although it sounds silly:

  1. Right-click on LaunchScreen.xib or in the start screen file and select Remove file , then select Remove to trash . This will remove all links to the file and its past updates from your project.

  2. Go to the trash and drag the file back into the xCode project (within yourProjectName ).

  3. Clean and restore.

0
Aug 15 '19 at 11:48
source share

Try to open the simulator by going to Hardware β†’ Erase all contents and settings.

-one
Mar 18 '19 at 11:30
source share



All Articles