From 38306e97650fe21c77ee66b987b1b23dedd720e7 Mon Sep 17 00:00:00 2001 From: dankito Date: Fri, 31 Jul 2020 00:31:19 +0200 Subject: [PATCH] Fixed that app data gets saved to documents instead of application support directory --- ui/BankingiOSApp/BankingiOSApp/SceneDelegate.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/BankingiOSApp/BankingiOSApp/SceneDelegate.swift b/ui/BankingiOSApp/BankingiOSApp/SceneDelegate.swift index 003ff5d0..888473b5 100644 --- a/ui/BankingiOSApp/BankingiOSApp/SceneDelegate.swift +++ b/ui/BankingiOSApp/BankingiOSApp/SceneDelegate.swift @@ -35,7 +35,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { } private func setupBankingUi(context: NSManagedObjectContext) { - let appDataFolder = NSSearchPathForDirectoriesInDomains(FileManager.SearchPathDirectory.applicationSupportDirectory, .userDomainMask, true).first + let appDataFolder = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true).first ?? Bundle.main.resourceURL?.absoluteString ?? "" let persistence = CoreDataBankingPersistence(context: context)