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
key
The key data stored in.
scope
The user-default scope.
-
Create location based on provided data.
Declaration
Swift
public init(type: Value.Type, scope: Scope) where Key == ObjectIdentifier
Parameters
type
The state data type.
scope
The 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
keyPath
The specification keyPath.
scope
The location scope.
-
Load data for provided instance.
Declaration
Swift
public func load(fromInstance sdkInstance: MoEngageSDKInstance) -> Value?
Parameters
sdkInstance
The 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
value
Saved value.
sdkInstance
The SDK instnace for which to save.
-
Remove data in provided instance.
Declaration
Swift
public func remove(inInstance sdkInstance: MoEngageSDKInstance)
Parameters
sdkInstance
The SDK instnace for which to remove.
-
Declaration
Swift
public enum Scope : String