From de7d1cfaf36a725a45192a0942aaf1e8674854fe Mon Sep 17 00:00:00 2001 From: 杨锴 <841720330@qq.com> Date: 星期六, 25 一月 2025 23:43:07 +0800 Subject: [PATCH] fix bug --- XQMuse/AppDelegate.swift | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/XQMuse/AppDelegate.swift b/XQMuse/AppDelegate.swift index 3aa82dc..114c2b9 100644 --- a/XQMuse/AppDelegate.swift +++ b/XQMuse/AppDelegate.swift @@ -15,6 +15,7 @@ func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + removeLaunchScreenCacheIfNeeded() WeChatTools.register(appid: WeChatAPPID, link: "https://app.xqzhihui.com/app/") return true } @@ -73,7 +74,18 @@ } + func removeLaunchScreenCacheIfNeeded() { + let filePath = NSHomeDirectory() + "/Library/SplashBoard" + if FileManager.default.fileExists(atPath: filePath) { + do { + try FileManager.default.removeItem(atPath: filePath) + print("清除LaunchScreen缓存成功") + } catch { + print("清除LaunchScreen缓存失败") + } + } + } } -- Gitblit v1.7.1