CleanInsightsSDK Documentation Beta

Protocol Consent​Request​Ui

@objc public protocol ConsentRequestUi

Implement this to provide a UI which explains your campaigns.

Questions you should answer to the user:

  • Why do you need these measurements?

  • How long will they get collected?

  • What might attackers learn from these numbers?

  • How long will you store them on your servers?

  • What are you going to do with these measurements?

  • How will the user benefit from these measurements?

Requirements

show(campaign​Id:​campaign:​_:​)

@objc func show(campaignId: String, campaign: Campaign, _ complete: @escaping Complete)

Will be called if it is necessary to ask the user for consent to a measurement campaign.

Parameters

campaign​Id String

The campaign identifier.

campaign Campaign

The campaign configuration.

complete @escaping Complete

The callback which will store the consent or the denial of it.

show(feature:​_:​)

@objc func show(feature: Feature, _ complete: @escaping Complete)

Will be called if it is necessary to ask the user for consent to record a common feature while measuring a campaign.

Parameters

feature Feature

The feature to record. (e.g. user agent, locale)

complete @escaping Complete

The callback which will store the consent or the denial of it.