SessionState
public class SessionState
A set of helper functions to manipulate session data.
-
The session ID.
Declaration
Swift
public let id: String -
Reload the session data from the session
Store.Declaration
Swift
public func reload(callback: @escaping (NSError?) -> Void)Parameters
callbackThe closure to invoke once the reading of session data is complete.
-
Save the session data to the session
Store.Declaration
Swift
public func save(callback: @escaping (NSError?) -> Void)Parameters
callbackThe closure to invoke once the writing of session data is complete.
-
Delete the session data from the session
Store.Declaration
Swift
public func destroy(callback: @escaping (NSError?) -> Void)Parameters
callbackThe closure to invoke once the deletion of session data is complete.
-
Remove an entry from the session data.
Declaration
Swift
public func remove(key: String)Parameters
keyThe key of the entry to delete.
-
Retrieve or store an entry from the session data.
Declaration
Swift
public subscript(key: String) -> Any? { get set }Parameters
keyThe key of the entry to retrieve.
-
Undocumented
Declaration
Swift
public subscript<T>(key: String) -> T? where T : Decodable, T : Encodable { get set }
View on GitHub
SessionState Class Reference