The Machine Learning Consent module captures the user's consent to process their biometric data for machine-learning purposes. You choose the consent text variant (US, GDPR, or worldwide) that matches your compliance needs.
You add this module in code by adding it to your IncdOnboardingFlowConfiguration (flowConfig), as shown on this page. See Integration Approaches for how to define and run the flow.
Availability: All variants.
Add Machine Learning Consent
Add the module to the flow with addMachineLearningConsent(type:). The type argument is required. There is no default, so you always pass the regulation variant explicitly.
flowConfig.addMachineLearningConsent(type: .us) // .us / .gdpr / .worldwide
Example
The example below adds the module to the flow configuration and handles the result through IncdOnboardingDelegate.
flowConfig.addMachineLearningConsent(type: .us)
func onMachineLearningConsentCompleted(_ result: MachineLearningConsentResult) {
// Consent step completed. Process the result.
}
Configuration Options
Configure the module with addMachineLearningConsent().
| Option | Type | Description |
|---|---|---|
type |
RegulationType |
Selects the consent text variant: .us, .gdpr, or .worldwide. Must be supplied on every call. There is no default. |
Result
Machine Learning Consent delivers a MachineLearningConsentResult to the onMachineLearningConsentCompleted(_:) callback on your IncdOnboardingDelegate. Its fields are:
status: Bool?: The consent choice the user made and Incode recorded.trueif the user accepted the consent;falseif the user declined it;nilif the choice could not be recorded, in which caseerroris set.error: IncdError?: The error that occurred, when present; otherwise,nil.
The consent is optional, so the user can continue with or without it. The flow always continues to the next module. Read status to know what the user chose, and apply your own policy if your compliance rules require the consent.