Description
Add support for programmatic custom vendor consent (GDPR) to sourcepoint_unified_cmp, using the same native consent instance as loadMessage / loadPrivacyManager.
Requirements
Implementations of the following functions:
Future<SPConsent> customConsentGdpr({
required List<String> vendors,
required List<String> categories,
required List<String> legIntCategories,
});
Optional (symmetry with native SDK):
Swift
Future<SPConsent> deleteCustomConsentGdpr({
required List<String> vendors,
required List<String> categories,
required List<String> legIntCategories,
});
On success:
Persist consent in native storage.
Update the registered ConsentChangeNotifier (updateConsent).
Invoke existing delegate callbacks (onConsentReady and/or onSpFinished) with the updated SPConsent.
Native APIs to integrate
Android — com.sourcepoint.cmplibrary.SpConsentLib (same instance as in SourcepointUnifiedCmpPlugin):
spConsentLib.customConsentGDPR(
vendors = listOf("..."),
categories = listOf("..."),
legIntCategories = emptyList(),
success = { spConsents: SPConsents? -> /* map to HostAPISPConsent, notify Flutter */ },
)
Docs: android-cmp-app — Adding or Removing custom consents.
iOS — SPConsentManager in ConsentViewController (same instance as in SourcepointUnifiedCmpPlugin):
consentManager.customConsentGDPR(
vendors: ["..."],
categories: ["..."],
legIntCategories: [],
) { /* handler */ }
Docs: ios-cmp-app — Adding or Removing custom consents.
Description
Add support for programmatic custom vendor consent (GDPR) to sourcepoint_unified_cmp, using the same native consent instance as loadMessage / loadPrivacyManager.
Requirements
Implementations of the following functions:
Optional (symmetry with native SDK):
On success:
Persist consent in native storage.
Update the registered ConsentChangeNotifier (updateConsent).
Invoke existing delegate callbacks (onConsentReady and/or onSpFinished) with the updated SPConsent.
Native APIs to integrate
Android — com.sourcepoint.cmplibrary.SpConsentLib (same instance as in SourcepointUnifiedCmpPlugin):
Docs: android-cmp-app — Adding or Removing custom consents.
iOS — SPConsentManager in ConsentViewController (same instance as in SourcepointUnifiedCmpPlugin):
Docs: ios-cmp-app — Adding or Removing custom consents.