Exclude all items from iCloud backup

Signed-off-by: Andy Uhnak <andyuhnak@gmail.com>
This commit is contained in:
Andy Uhnak
2022-02-08 14:04:00 +00:00
parent 7964d314c8
commit 4c841fc6b2
5 changed files with 31 additions and 5 deletions

View File

@@ -61,6 +61,14 @@ class URLPreviewStore {
if let error = error {
MXLog.error("[URLPreviewStore] Core Data container error: \(error.localizedDescription)")
}
if let url = storeDescription.url {
do {
try FileManager.default.excludeItemFromBackup(at: url)
} catch {
MXLog.error("[URLPreviewStore] Cannot exclude Core Data from backup: \(error.localizedDescription)")
}
}
}
}