VOPersistManagerProtocol

@protocol VOPersistManagerProtocol

VOPersistManagerProtocol is the interface for saving information indefinitely.

  • Returns the object for the associated key from persistance.

    Declaration

    Objective-C

    - (id)getObjectForKey:(NSString *)key;

    Swift

    func getObjectForKey(_ key: Any!) -> Any!

    Parameters

    key

    - the key associated with the object.

    Return Value

    object assoicated with the key.

  • Saves an object in persistance with an associated key. If a value is already saved for this key, that value will be saved overtop of this one.

    Declaration

    Objective-C

    - (void)saveObject:(id)value forKey:(NSString *)key;

    Swift

    func save(_ value: Any!, forKey key: Any!)

    Parameters

    value

    - the object being saved.

    key

    - the key associated with the object.

  • Removes an object from the persistance with associated key.

    Declaration

    Objective-C

    - (void)removeObjectForKey:(NSString *)key;

    Swift

    func removeObject(forKey key: Any!)

    Parameters

    key

    - the key associated with the object.