Classes
The following classes are available globally.
-
See moreKeychainStorageis a generic class that conforms to theStorageDelegateprotocol, providing a secure storage solution by leveraging the keychain. It is designed to store, retrieve, and manage objects of typeT, whereTmust conform to theCodableprotocol. This requirement ensures that the objects can be easily encoded and decoded for secure storage in the keychain.Declaration
Swift
public class KeychainStorage<T> : StorageDelegate<T>, @unchecked Sendable where T : Decodable, T : Encodable, T : SendableParameters
TThe type of the objects to be stored in the keychain. Must conform to
Codable. -
MemoryStorageprovides an in-memory storage solution for objects of typeT. It conforms to theStorageDelegateprotocol, enabling it to interact seamlessly with other components expecting a storage delegate. This class is ideal for temporary storage where persistence across app launches is not required.The generic type
See moreTmust conform toCodableto ensure that objects can be encoded and decoded when written to and read from memory, respectively.Declaration
Swift
public class MemoryStorage<T> : StorageDelegate<T>, @unchecked Sendable where T : Decodable, T : Encodable, T : SendableParameters
TThe type of the objects to be stored. Must conform to
Codable. -
A storage delegate class that delegates its operations to a storage. It can optionally cache the stored item in memory. This class is designed to be subclassed by specific storage strategies (e.g., keychain, in-memory) that conform to the
See moreStorageprotocol.Declaration
Swift
open class StorageDelegate<T> : Storage, @unchecked Sendable where T : Decodable, T : Encodable, T : SendableParameters
TThe type of the object being stored. Must conform to
Codableto ensure that object can be easily encoded and decoded.
Classes Reference