PersistentStoreManaging
public protocol PersistentStoreManaging : AnyObject
Implementers must implement this for manage the persistent store.
-
Tries to create store with the given password. After creation opens the store and will be ready to use.
Throws
StoreManagerErrorDeclaration
Swift
func createStore(name: String, passcode: String?) throws -> DataStoringParameters
namename of the store
passcodethe passcode given by the user
Return Value
created store
-
Tries to open the store with the given passcode
Throws
StoreManagerErrorDeclaration
Swift
func openStore(name: String, passcode: String?) throws -> DataStoringParameters
namename of the store
passcodethe passcode given by the user
Return Value
opened store
-
Removes the given store from the FileManager, if exists Before deletion, the store will be closed anyway
Throws
StoreManagerErrorDeclaration
Swift
func removeStore(name: String, store: DataStoring?) throwsParameters
namename of the store
storethe store to remove, conforms to DataStoring protocol
-
Change the encryption of the given store
Throws
StoreManagerErrorDeclaration
Swift
func changePasscode(store: DataStoring, newPasscode: String?) throwsParameters
storethe store whose passcode has to be changed, conforms to DataStoring protocol
newPasscodethe new passcode as encryptionkey
-
Checks if the store exists for the given name.
Declaration
Swift
func storeExists(name: String) throws -> BoolParameters
namename of the store
Return Value
true if the store exists, false otherwise