diff --git a/AltStore/Settings/SettingsViewController.swift b/AltStore/Settings/SettingsViewController.swift index aa40cd12..402314b8 100644 --- a/AltStore/Settings/SettingsViewController.swift +++ b/AltStore/Settings/SettingsViewController.swift @@ -577,11 +577,12 @@ extension SettingsViewController alertController.addAction(UIAlertAction(title: NSLocalizedString("Delete and Reset", comment: ""), style: .destructive){ _ in if fm.fileExists(atPath: documentsPath.path), let contents = try? String(contentsOf: documentsPath), !contents.isEmpty { + UserDefaults.standard.isPairingReset = true try? fm.removeItem(atPath: documentsPath.path) NSLog("Pairing File Reseted") } self.tableView.deselectRow(at: indexPath, animated: true) - let dialogMessage = UIAlertController(title: NSLocalizedString("Pairing File Reseted", comment: ""), message: NSLocalizedString("Please restart SideStore", comment: ""), preferredStyle: .alert) + let dialogMessage = UIAlertController(title: NSLocalizedString("Pairing File Reset", comment: ""), message: NSLocalizedString("Please restart SideStore", comment: ""), preferredStyle: .alert) self.present(dialogMessage, animated: true, completion: nil) }) alertController.addAction(.cancel) diff --git a/AltStoreCore/Extensions/UserDefaults+AltStore.swift b/AltStoreCore/Extensions/UserDefaults+AltStore.swift index 84fe5b67..96b2a5eb 100644 --- a/AltStoreCore/Extensions/UserDefaults+AltStore.swift +++ b/AltStoreCore/Extensions/UserDefaults+AltStore.swift @@ -28,6 +28,7 @@ public extension UserDefaults @NSManaged var isBackgroundRefreshEnabled: Bool @NSManaged var isIdleTimeoutDisableEnabled: Bool + @NSManaged var isPairingReset: Bool @NSManaged var isDebugModeEnabled: Bool @NSManaged var presentedLaunchReminderNotification: Bool @@ -74,6 +75,7 @@ public extension UserDefaults let defaults = [ #keyPath(UserDefaults.isBackgroundRefreshEnabled): true, #keyPath(UserDefaults.isIdleTimeoutDisableEnabled): true, + #keyPath(UserDefaults.isPairingReset): true, #keyPath(UserDefaults.isLegacyDeactivationSupported): isLegacyDeactivationSupported, #keyPath(UserDefaults.activeAppLimitIncludesExtensions): activeAppLimitIncludesExtensions, #keyPath(UserDefaults.localServerSupportsRefreshing): localServerSupportsRefreshing,