From 86a6fb639513ef5ab6c07ad70ad4aa87ea23e9f2 Mon Sep 17 00:00:00 2001 From: Yishi Lin Date: Tue, 13 Jun 2017 13:04:39 +0800 Subject: [PATCH] Fix erase and removePGPKeys - Remove SharedDefaults instead of Defaults --- passKit/Models/PasswordStore.swift | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/passKit/Models/PasswordStore.swift b/passKit/Models/PasswordStore.swift index 68bcc1b..19360c7 100644 --- a/passKit/Models/PasswordStore.swift +++ b/passKit/Models/PasswordStore.swift @@ -726,7 +726,7 @@ public class PasswordStore { deleteCoreData(entityName: "PasswordEntity") - Defaults.removeAll() + SharedDefaults.removeAll() storeRepository = nil NotificationCenter.default.post(name: .passwordStoreUpdated, object: nil) @@ -818,11 +818,11 @@ public class PasswordStore { public func removePGPKeys() { Utils.removeFileIfExists(atPath: Globals.pgpPublicKeyPath) Utils.removeFileIfExists(atPath: Globals.pgpPrivateKeyPath) - Defaults.remove(.pgpKeySource) - Defaults.remove(.pgpPublicKeyArmor) - Defaults.remove(.pgpPrivateKeyArmor) - Defaults.remove(.pgpPrivateKeyURL) - Defaults.remove(.pgpPublicKeyURL) + SharedDefaults.remove(.pgpKeySource) + SharedDefaults.remove(.pgpPublicKeyArmor) + SharedDefaults.remove(.pgpPrivateKeyArmor) + SharedDefaults.remove(.pgpPrivateKeyURL) + SharedDefaults.remove(.pgpPublicKeyURL) Utils.removeKeychain(name: ".pgpKeyPassphrase") pgp = ObjectivePGP() publicKey = nil