Fixed that app data gets saved to documents instead of application support directory

This commit is contained in:
dankito 2020-07-31 00:31:19 +02:00
parent 2a1b9ce198
commit 38306e9765
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
} }
private func setupBankingUi(context: NSManagedObjectContext) { 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 ?? "" ?? Bundle.main.resourceURL?.absoluteString ?? ""
let persistence = CoreDataBankingPersistence(context: context) let persistence = CoreDataBankingPersistence(context: context)