Structures
The following structures are available globally.
-
A type-erased wrapper for any Codable value.
This wrapper allows heterogeneous data types to be stored in the same dictionary while maintaining Codable compliance for JSON serialization.
Supported Types
- Primitives: Bool, Int, Double, String
- Collections: Arrays and Dictionaries (recursively)
- Null values: NSNull representation
Usage
See morelet anyValue = AnyValue("Hello World") let originalValue = anyValue.value as? StringDeclaration
Swift
public struct AnyValue : Codable, @unchecked Sendable -
A dynamic coding key implementation that allows encoding and decoding of arbitrary JSON keys.
This structure provides flexibility when working with JSON data that contains dynamic or unknown keys at compile time, supporting both string and integer-based keys.
See moreDeclaration
Swift
public struct JSONCodingKeys : CodingKey -
A utility structure providing helper methods for JSON serialization and manipulation.
See moreJSONUtilsoffers static methods for common JSON operations, including converting objects to JSON strings with configurable formatting options.Declaration
Swift
public struct JSONUtils -
Describes a single step in a migration pipeline.
MigrationStepis a lightweight value type that provides identification and display metadata for a migration step. Each migration module defines its own steps asstaticproperties via extensions.The
idproperty provides a stable, non-localizable identifier for programmatic checks (e.g., UI state comparisons), whiledescriptionis a human-readable, display-only field that can be freely translated.Defining Custom Steps
Migration modules extend
MigrationStepwith their own step constants:extension MigrationStep { static let importLegacyData = MigrationStep(id: "importLegacyData", description: "Import legacy data") static let migrateCredentials = MigrationStep(id: "migrateCredentials", description: "Migrate credentials") static let cleanup = MigrationStep(id: "cleanup", description: "Cleanup legacy data") }Usage
Steps are passed as associated values in
MigrationProgressevents:case .inProgress(let step, let current, let total): print("Step \(current)/\(total): \(step.description)")See moreSee also
MigrationProgressDeclaration
Swift
public struct MigrationStep : Sendable, Identifiable, Equatable, Hashable, CustomStringConvertible -
Policy that checks if biometric authentication is available on the device.
This policy evaluates whether the device has biometric capabilities and if they are properly configured for authentication.
JSON format: {“biometricAvailable”: {}}
See moreDeclaration
Swift
public struct BiometricAvailablePolicy : MfaPolicy, Sendable -
Represents the result of policy evaluation for a credential. Encapsulates both the compliance status and identifies which policy (if any) caused non-compliance.
See moreDeclaration
Swift
public struct MfaPolicyResult : Sendable
View on GitHub
Structures Reference