standardConfiguration
TypeScriptstatic get standardConfiguration(): PredicateCodableConfigurationSwift declarationstatic let standardConfiguration: PredicateCodableConfigurationstruct · iOS 17.0+ · SDK 27.1
struct PredicateCodableConfigurationA specification of the expected types and key paths found in an archived predicate. Use this configuration when encoding and decoding a predicate to restrict what that predicate can contain. If a predicate contains data types or keypaths that aren't allowed by the configuration, the encoding or decoding process throws an error. ```swift var configuration = PredicateCodableConfiguration.standardConfiguration configuration.allowType(Message.self, identifier: "MyApp.Message") configuration.allowType(Person.self, identifier: "MyApp.Person") configuration.allowKeyPath(\Message.sender, identifier: "MyApp.Message.sender") configuration.allowKeyPath(\Person.firstName, identifier: "MyApp.Person.firstName") configuration.allowKeyPath(\Person.lastName, identifier: "MyApp.Person.lastName") struct MyRequest: Codable { let predicate: Predicate<Message> func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encode(predicate, forKey: .predicate, configuration: configuration) } init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) predicate = try container.decode(Predicate<Message>.self, forKey: .predicate, configuration: configuration) } } ```
static get standardConfiguration(): PredicateCodableConfigurationSwift declarationstatic let standardConfiguration: PredicateCodableConfigurationallowKeyPath(keyPath: (SDKHandle) & (SDKHandle), identifier: string): voidSwift declarationmutating func allowKeyPath(_ keyPath: any AnyKeyPath & Sendable, identifier: String)disallowKeyPath(keyPath: (SDKHandle) & (SDKHandle)): voidSwift declarationmutating func disallowKeyPath(_ keyPath: any AnyKeyPath & Sendable)get debugDescription(): stringSwift declarationvar debugDescription: String { get }A textual representation of this instance, suitable for debugging. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(reflecting:)` initializer. This initializer works with any type, and uses the custom `debugDescription` property for types that conform to `CustomDebugStringConvertible`: struct Point: CustomDebugStringConvertible { let x: Int, y: Int var debugDescription: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(reflecting: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `debugDescription` property.
allow(other: PredicateCodableConfiguration): voidSwift declarationmutating func allow(_ other: PredicateCodableConfiguration)static init(): PredicateCodableConfigurationSwift declarationinit()6 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.
PredicateCodableConfiguration.allowType(_:identifier:)
Passing a Swift type itself is not supported.
PredicateCodableConfiguration.disallowType(_:)
Passing a Swift type itself is not supported.
PredicateCodableConfiguration.allowPartialType(_:identifier:)
Passing a Swift type itself is not supported.
PredicateCodableConfiguration.disallowPartialType(_:)
Passing a Swift type itself is not supported.
PredicateCodableConfiguration.allowKeyPathsForPropertiesProvided(by:recursive:)
Passing a Swift type itself is not supported.
PredicateCodableConfiguration.disallowKeyPathsForPropertiesProvided(by:recursive:)
Passing a Swift type itself is not supported.