[英]iOS (swift) old launch screen displaying after upgrade the application on iphone 11 , 11 pro , 11 pro max with iOS 13.3
Steps for replicate :复制步骤:
Result : Launch screen text not changed.结果:启动屏幕文本未更改。 Old text showing on Launch screen .
启动屏幕上显示的旧文本。
The system caches launch images and doesn't clear them very proactively.系统缓存启动图像并且不会非常主动地清除它们。 You can add code to clear the cache yourself, although I'd stick this behind a feature flag as circumventing the cache isn't something you probably want to do all the time.
您可以添加代码来自己清除缓存,尽管我会将其放在功能标志后面,因为您可能不会一直想要绕过缓存。
import UIKit
public extension UIApplication {
func clearLaunchScreenCache() {
do {
try FileManager.default.removeItem(atPath: NSHomeDirectory()+"/Library/SplashBoard")
} catch {
print("Failed to delete launch screen cache: \(error)")
}
}
}
Code snippet taken from: https://rambo.codes/posts/2019-12-09-clearing-your-apps-launch-screen-cache-on-ios代码片段取自: https ://rambo.codes/posts/2019-12-09-clearing-your-apps-launch-screen-cache-on-ios
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.