I have an app where I recently replaced the launch images and app icons, I removed all of the old assets from everywhere in the project. When I upgrade the app from the old version to the new version by just building in Xcode, everything is fine. However, if I have the old version of my app installed then upgrade it from TestFlight, every time I kill the app then restart it the old launch image briefly appears before showing the new launch image. Similarly when I then close the app, the old app icon briefly flashes before switching back to my new one.

我使用iExplorer打开应用,并注意到/Library/Caches/Shapshots目录中保存了旧的启动屏幕图像(我不知道它是如何或为什么会出现在那里)。当我通过iExplorer手动删除它时,它就不再出现了。但是,当我尝试使用NSFileManager方法用代码删除它时,我得到错误,说我被禁止删除这个目录中的文件。

有人有过这样的经历吗?有什么建议吗?


当前回答

对于模拟器,只需重置内容和设置…

其他回答

首先

清洁与建造项目

方法1: 重命名LaunchScreen.storyboard中加载的Splash图像。

例如,我加载了“splash”,但将其更改为“splashNew”。

方法2:

在不同的设备或模拟器上运行应用程序

例如,如果你在模拟器iphone 11中运行应用程序,那么将它运行到iphone 12中

卸载你的应用程序,重启你的手机,重新安装你的应用程序…这在我的例子中是固定的。

对我有用的是:

删除启动屏幕的场景和视图控制器,并创建一个新的(确保你在属性检查器中将其设置为“初始视图控制器”)。

什么对我不起作用:

删除应用 重新启动iPhone、Mac或Xcode 删除派生数据 删除设备的容器 清洁 焚烧3个史蒂夫·乔布斯的巫毒娃娃

注意:

有时也需要擦除(模拟器)

解决方案为我工作

从设备中删除应用程序 关闭设备 打开设备 清洁构建文件夹 再次构建、安装和启动应用程序。 享受

在我的情况下,我没有选择应用程序图标来源从应用程序设置->通用->应用程序图标和启动图像->应用程序图标来源