From e13d733413f1db5106be58176693df1a076e1139 Mon Sep 17 00:00:00 2001 From: John Rosendahl Date: Fri, 30 Oct 2026 14:12:13 -0600 Subject: [PATCH] Document the IAB GPP UserDefaults keys the SDK now reads #86 switched the gpp fallback to IABGPP_HDR_GppString and added an IABGPP_GppSID fallback for gppSid, so the consent table and the "gppSid has no fallback" paragraph in both guides were out of date. Co-Authored-By: Claude Opus 5.5 --- docs/usage-objc.md | 8 +++++--- docs/usage-swift.md | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/docs/usage-objc.md b/docs/usage-objc.md index 0ddb304..1a29546 100644 --- a/docs/usage-objc.md +++ b/docs/usage-objc.md @@ -114,11 +114,13 @@ If you don't set them, the SDK reads the values that an IAB-compliant consent ma | Config property | `NSUserDefaults` fallback key | Sent as | |---|---|---| | `gdpr` + `gdprConsent` | `IABTCF_gdprApplies` + `IABTCF_TCString` | `gdpr`, `gdpr_consent` | -| `gpp` | `IABGPP_2_TCString` | `gpp` | -| `gppSid` | none | `gpp_sid` | +| `gpp` | `IABGPP_HDR_GppString` | `gpp` | +| `gppSid` | `IABGPP_GppSID` | `gpp_sid` | | `reg` | none | `reg` | -`gdpr` and `gdprConsent` are used together: if either one is missing from the config, the SDK ignores both and uses the `NSUserDefaults` values instead. `gppSid` has no `NSUserDefaults` fallback, so if you rely on your CMP for `gpp`, set `gppSid` yourself. +`gdpr` and `gdprConsent` are used together: if either one is missing from the config, the SDK ignores both and uses the `NSUserDefaults` values instead. `gppSid` falls back to `IABGPP_GppSID` only when `gpp` also comes from `NSUserDefaults`, so the section IDs always match the string they describe: if you set `gpp` in the config, set `gppSid` too. The CMP stores section IDs separated by underscores (`2_7`); the SDK sends them comma-separated (`2,7`). + +If `IABGPP_HDR_GppString` is not set, the SDK also reads `gpp` from `IABGPP_2_TCString`, a key that earlier versions of the SDK used. ### Identify API diff --git a/docs/usage-swift.md b/docs/usage-swift.md index 9b4bb1a..e318bb9 100644 --- a/docs/usage-swift.md +++ b/docs/usage-swift.md @@ -92,11 +92,13 @@ If you don't set them, the SDK reads the values that an IAB-compliant consent ma | Config property | `UserDefaults` fallback key | Sent as | |---|---|---| | `gdpr` + `gdprConsent` | `IABTCF_gdprApplies` + `IABTCF_TCString` | `gdpr`, `gdpr_consent` | -| `gpp` | `IABGPP_2_TCString` | `gpp` | -| `gppSid` | none | `gpp_sid` | +| `gpp` | `IABGPP_HDR_GppString` | `gpp` | +| `gppSid` | `IABGPP_GppSID` | `gpp_sid` | | `reg` | none | `reg` | -`gdpr` and `gdprConsent` are used together: if either one is missing from the config, the SDK ignores both and uses the `UserDefaults` values instead. `gppSid` has no `UserDefaults` fallback, so if you rely on your CMP for `gpp`, set `gppSid` yourself. +`gdpr` and `gdprConsent` are used together: if either one is missing from the config, the SDK ignores both and uses the `UserDefaults` values instead. `gppSid` falls back to `IABGPP_GppSID` only when `gpp` also comes from `UserDefaults`, so the section IDs always match the string they describe: if you set `gpp` in the config, set `gppSid` too. The CMP stores section IDs separated by underscores (`2_7`); the SDK sends them comma-separated (`2,7`). + +If `IABGPP_HDR_GppString` is not set, the SDK also reads `gpp` from `IABGPP_2_TCString`, a key that earlier versions of the SDK used. ### Identify API