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
callback
The 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
callback
The 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
callback
The 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
key
The 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
key
The key of the entry to retrieve.
-
Undocumented
Declaration
Swift
public subscript<T>(key: String) -> T? where T : Decodable, T : Encodable { get set }