AppsFlyerConsent

Resumen General

AppsFlyerConsent encapsulates the properties for acquiring consent data required by the Digital Marketing Act (DMA) under the GDPR regulation.

Initializers

initForGDPRUser

Argumentos de entrada

TipoNombreDescripción
BooleanoforGDPRUserWithHasConsentForDataUsageIndicates whether the user consented to share for advertising purposes.
BooleanohasConsentForAdsPersonalizationIndicates whether the user consented to share their data for ad optimization.

Ejemplos de uso

// If the user is subject to GDPR - collect the consent data
// or retrieve it from the storage

// Set the consent data to the SDK:
var gdprConsent = AppsFlyerConsent(forGDPRUserWithHasConsentForDataUsage: true, hasConsentForAdsPersonalization: true) 
AppsFlyerLib.shared().setConsentData(gdprConsent)

initForNonGDPRUser

Argumentos de entrada

Nada

Ejemplos de uso

// If the user is not subject to GDPR:
var nonGdprUser = AppsFlyerConsent(nonGDPRUser: ()) 
AppsFlyerLib.shared().setConsentData(nonGdprUser)