|
@@ -38,6 +38,24 @@ class NCSettingsBundleHelper: NSObject {
|
|
|
class func checkAndExecuteSettings() {
|
|
|
if UserDefaults.standard.bool(forKey: SettingsBundleKeys.Reset) {
|
|
|
UserDefaults.standard.set(false, forKey: SettingsBundleKeys.Reset)
|
|
|
+
|
|
|
+ let content = UNMutableNotificationContent()
|
|
|
+ content.title = NCBrandOptions.shared.brand
|
|
|
+ content.body = NSLocalizedString("_reset_application_done_", comment: "")
|
|
|
+ let req = UNNotificationRequest(identifier: UUID().uuidString, content: content, trigger: nil)
|
|
|
+ let notificationCenter = UNUserNotificationCenter.current()
|
|
|
+ notificationCenter.add(req)
|
|
|
+
|
|
|
+ URLCache.shared.memoryCapacity = 0
|
|
|
+ URLCache.shared.diskCapacity = 0
|
|
|
+
|
|
|
+ CCUtility.removeGroupDirectoryProviderStorage()
|
|
|
+ CCUtility.removeGroupApplicationSupport()
|
|
|
+ CCUtility.removeDocumentsDirectory()
|
|
|
+ CCUtility.removeTemporaryDirectory()
|
|
|
+
|
|
|
+ CCUtility.deleteAllChainStore()
|
|
|
+ NCManageDatabase.shared.removeDB()
|
|
|
}
|
|
|
}
|
|
|
}
|