MoEngageInMemoryStorage
public struct MoEngageInMemoryStorage<Key, Value> : MoEngageStorageLocation where Key : Hashable
-
Create location based on provided data.
Declaration
Swift
public init(key: Key, scope: Scope)Parameters
keyThe key data stored in.
scopeThe user-default scope.
-
Create location based on provided data.
Declaration
Swift
public init(type: Value.Type, scope: Scope) where Key == ObjectIdentifierParameters
typeThe state data type.
scopeThe location scope.
-
Create location based on provided data.
Declaration
Swift
public init<Root>(keyPath: KeyPath<Root, Value>, scope: Scope) where Key == KeyPath<Root, Value>Parameters
keyPathThe specification keyPath.
scopeThe location scope.
-
Load data for provided instance.
Declaration
Swift
public func load(fromInstance sdkInstance: MoEngageSDKInstance) -> Value?Parameters
sdkInstanceThe SDK instnace for which to load.
Return Value
The value stored.
-
Save provided value for the instance.
Declaration
Swift
public func save(_ value: Value?, inInstance sdkInstance: MoEngageSDKInstance)Parameters
valueSaved value.
sdkInstanceThe SDK instnace for which to save.
-
Remove data in provided instance.
Declaration
Swift
public func remove(inInstance sdkInstance: MoEngageSDKInstance)Parameters
sdkInstanceThe SDK instnace for which to remove.
-
Declaration
Swift
public enum Scope : String