Upgraded application showing the old launch-screen/image before show the new animated launch-screen

We have changed the launch-screen of one of our iOS applications. We have replaced the old launch-screen with new launch-screen storyboard, with some interactive animated stuff on that. But, the old version of the launch-screen/image has got cached on existing devices i.e. devices of application users. After upgrade, these devices where always showing (splash) old launch-screen/image, before the new launch-screen storyboard shows up, on every launch of the upgraded application. This is how it is:


Before

  1. Display old launch-screen/image
  2. Main storyboard loaded, application launched


Now, After Upgrade

  1. Display old launch-screen/image [ The Main Issue ]
  2. Display new animated launch-screen
  3. Main storyboard loaded, application launched


To clear the old cached launch-screen/image, we have implemented following code to clear the launch-screen/image cache at the very first entry point (main.swift) of the application bootstrap process.


FileManager.default.removeItem(atPath:NSHomeDirectory()+"/Library/SplashBoard")


Now, after implementation of this code, old launch-screen/image is still showing after upgrade, before loading of launch-screen storyboard animation. The main improvement (90% solved) that we got here is, that the old launch-screen/image is displaying for the first launch of (only) the application after upgrade. While the code above is doing its job, the old launch-screen/image is not showing for re-launch and launches after the first launch of the application after upgrade.


But, we still are looking for the solution to eliminate the old launch-screen storyboard completely i.e. remove it from OS cache even, even before first launch of the upgraded application. Or maybe, if there is something that we can configure in the application properties to ignore or clean the old launch-screen/image cache.


One more important point to note here is that the launch-image has been deprecated in iOS 13.3, they are asking to use Launch-Screen only. And, the issue is appearing only in devices that are running on iOS 13.3 (new models only, 2018-2019). All older versions/devices are working correct i.e. not showing the old launch-screen/image ever, in upgraded application. Here is the detail to reproduce the issues, steps that we have taken and the current status:


#### TEST ONE (1) ####


Steps to Reproduce

  • Use existing application or create a demo application with launch-screen/image (A) configured
  • Launch, re-launch i.e. use the application for 1 to 2 minutes, showing the launch-screen/image (A) on each launch
  • Now, delete launch-screen/image (A) in source code, create new launch-screen storyboard (B) with different image/logo
  • Compile and upgrade the previous installed application with the one having launch-screen (B)
  • Launch the upgraded application


Expected Result

On 1st, 2nd and further launches of the upgraded application, it must show the new animated launch-screen only


Actual Results

  • [ issue ] First launch after upgrade: old launch-screen/image is showing (splash), before loading of new animated launch-screen storyboard
  • [ issue ] 2nd and further launch attempts after upgrade: old launch-screen/image is showing (splash), before loading of new animated launch-screen storyboard


#### TEST TWO (2) ####
Steps to Reproduce

  • Use existing application or create a demo application with launch-screen/image (A) configured
  • Launch, re-launch i.e. use the application for 1 to 2 minutes, showing the launch-screen/image (A) on each launch
  • Now, delete launch-screen/image (A) in source code, create new launch-screen storyboard (B) with different image/logo
  • Add following code in "main.swift" file = FileManager.default.removeItem(atPath:NSHomeDirectory()+"/Library/SplashBoard")
  • Compile and upgrade the previous installed application with the one having launch-screen (B)
  • Launch the upgraded application


Expected Result

On 1st, 2nd and further launches of the upgraded application, it must show the new animated launch-screen only


Actual Results

  • [ issue ] First launch after upgrade: old launch-screen/image is showing (splash), before loading of new animated launch-screen storyboard
  • [ fixed ] 2nd and further launch attempts after upgrade: application is showing new animated launch-screen storyboard directly

#### MORE INFORMATION ####
Environment

  • iOS Version : 13.3
  • XCode Version : 11.3
  • Models : iPhone (2018-2019)


Ideas Tested

  • Rename PNG images used for launch-screen/image
  • Rename PNG images group (asset) used for launch-screen/image
  • Move launch-screen/image assets to different location
  • Delete launch-image PNG files, group and configuration
  • Rename launch-screen story board


Related Threads


Possible Ideas, Looking For

  • Is there any way, by which we can perform/execute the launch-screen/image cache cleaning code somehow, immediate after upgrade, before user launches the upgraded application ?
  • Is there any configuration, preferences, settings, by which we can tell the platform (iOS) to ignore or disable the use of launch-screen/image i.e. springboard cache ?
  • Any other solution ?

Replies

WHat I understand here is that the only way to get it done immediately (not after first launch and clearing) is to remove the app.


But user loses its settings, which may be a high price to pay just to avoid the old launch screen on first launch.

Thanks for your reply @Claude31,



Our application is not storing any critical information in user preferences ( UserDefaults ) or app settings. So we can ignore the clearance of user preferences ( UserDefaults ) or app cache entirely, if there any solution available to have new launch screen on first bootstrap after upgrade the application.



Could you please share information, if you have something regarding this, that may help us in this case ?

Great Job! Thanks for the investigation. A couple of questions: Did you submit and got approved by Apple with this solution? Also can you confirm this worked on production? Thanks

Add a Comment

Did you find answers for your questions?

Did you find any generic solution for removing completely old launch image even from 1st launch?

I would be happy to know that as well 🙂

The next steps seem to me fine for keeping user data and clearing launch screen cache.


1. Launch "Settings" and select General -> iPad/iPhone Storage -> your application -> "Offload App"

2. After cloud icon shown, select "Reinstall App"