GDPR/CCPA consent UI displayed where required
Why it matters
Collecting analytics or behavioral data from users in the EU without a consent UI violates GDPR Art. 7 (conditions for consent) and the ePrivacy Directive Art. 5(3). In California, CCPA §1798.100 requires disclosure and opt-out rights before selling or sharing personal information. Apps that initialize analytics SDKs unconditionally — before checking persisted consent — are non-compliant regardless of whether they display a banner later. Google Play's Data Safety section and Apple's App Store privacy label are public-facing disclosures; regulators and users can compare them against actual SDK behavior. A consent UI that does not gate SDK initialization is cosmetically compliant but legally exposed: the DPA enforcement record consistently shows that the banner must actually stop data flow, not just record a preference.
Severity rationale
High because analytics SDK initialization before consent is persisted and checked is a direct GDPR Art. 7 violation, and regulators have fined companies specifically for consent UIs that do not actually stop data collection.
Remediation
Gate all analytics SDK initialization behind a persisted consent check. The SDK must not call any tracking method until userConsent === 'true' is read from storage.
import AsyncStorage from '@react-native-async-storage/async-storage'
import { initAnalytics, disableAnalytics } from './analytics'
export async function bootstrapWithConsent() {
const consent = await AsyncStorage.getItem('gdpr_consent')
if (consent === 'accepted') {
initAnalytics({ sampling: 1.0 })
} else {
// Do NOT initialize — SDK stays silent until user consents
disableAnalytics()
}
}
// Call on app start, before any navigation
bootstrapWithConsent()
The consent UI must offer a real decline option — "Accept" and "Settings" are not equivalent to "Accept" and "Decline". Store the user's choice and re-check on every app launch.
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the Mobile Permissions & Privacy Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- gdpr · Art. 7 — Conditions for consent
- gdpr · Art. 13 — Information to be provided where personal data are collected
- ccpa · §1798.100 — Right to know and opt-out
- eprivacy · Art. 5(3) — Confidentiality of communications / cookie consent
Taxons
History
- 2026-04-18·v1.0.0·Initial import from mobile-permissions-privacy·automated