ProtectCollector

@objc
public class ProtectCollector : NSObject, AnyFieldCollector, Collector, @unchecked Sendable

A collector class for handling RISK Component. This class implements the AnyFieldCollector and Collector protocols to collect data related to the Protect SDK.

  • property key: The unique identifier for the collector.
  • property behavioralDataCollection: A boolean indicating whether behavioral data collection is enabled.
  • property universalDeviceIdentification: A boolean indicating whether universal device identification is enabled.
  • Initializes the risk collector with the given input dictionary.

    Declaration

    Swift

    public required init(with json: [String : Any])

    Parameters

    input

    The dictionary containing initialization data.

  • Initializes the ProtectCollector with the given value. The ProtectCollector does not hold any value.

    Declaration

    Swift

    public func initialize(with value: Any)

    Parameters

    input

    The value to initialize the collector with.

  • id

    The UUID of the field collector.

    Declaration

    Swift

    public var id: String { get }
  • Declaration

    Swift

    public func payload() -> String?
  • Type-erased version of payload()

    Declaration

    Swift

    public func anyPayload() -> Any?
  • Validates this collector, returning a list of validation errors if any.

    Declaration

    Swift

    public func validate() -> [PingDavinci.ValidationError]

    Return Value

    An array of ValidationError.

  • collect() Asynchronous

    Collects data from the Protect SDK and returns it as a Result.

    Declaration

    Swift

    public func collect() async -> Result<String, Error>

    Return Value

    Result containing the collected data or an error if an exception occurs.

  • Registers the IdpCollector with the collector factory

    Declaration

    Swift

    @objc
    public static func registerCollector()