Browse Source

improve comment about keychain resetting

cyberta 3 years ago
parent
commit
ad02104dd6
1 changed files with 2 additions and 1 deletions
  1. 2 1
      deltachat-ios/AppDelegate.swift

+ 2 - 1
deltachat-ios/AppDelegate.swift

@@ -63,7 +63,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
         migrateToDcAccounts()
         migrateToDcAccounts()
 
 
         if let sharedUserDefaults = UserDefaults.shared, !sharedUserDefaults.bool(forKey: UserDefaults.hasSavedKeyToKeychain) {
         if let sharedUserDefaults = UserDefaults.shared, !sharedUserDefaults.bool(forKey: UserDefaults.hasSavedKeyToKeychain) {
-            // we can assume a fresh install -> reset the keychain for the case the app was removed and reinstalled
+            // we can assume a fresh install (UserDefaults are deleted on app removal)
+            // -> reset the keychain (which survives removals of the app) in case the app was removed and reinstalled.
             if !KeychainManager.deleteDBSecrets() {
             if !KeychainManager.deleteDBSecrets() {
                 logger.warning("Failed to delete DB secrets")
                 logger.warning("Failed to delete DB secrets")
             }
             }