From ed16f71ee4e29d754ad107b81e92ec1f7e6b32ab Mon Sep 17 00:00:00 2001 From: Avently <7953703+avently@users.noreply.github.com> Date: Fri, 14 Jun 2024 16:31:36 +0700 Subject: [PATCH] creating wallpaper dir at launch --- apps/ios/Shared/AppDelegate.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/ios/Shared/AppDelegate.swift b/apps/ios/Shared/AppDelegate.swift index 62dd56b965..1919d6dc03 100644 --- a/apps/ios/Shared/AppDelegate.swift +++ b/apps/ios/Shared/AppDelegate.swift @@ -17,6 +17,7 @@ class AppDelegate: NSObject, UIApplicationDelegate { if #available(iOS 17.0, *) { trackKeyboard() } NotificationCenter.default.addObserver(self, selector: #selector(pasteboardChanged), name: UIPasteboard.changedNotification, object: nil) removePasscodesIfReinstalled() + prepareForLaunch() return true } @@ -141,6 +142,10 @@ class AppDelegate: NSObject, UIApplicationDelegate { } } + private func prepareForLaunch() { + try? FileManager.default.createDirectory(at: getWallpaperDirectory(), withIntermediateDirectories: true) + } + static func keepScreenOn(_ on: Bool) { UIApplication.shared.isIdleTimerDisabled = on }