Mobile App Consent Management
DataGrail provides native SDKs for iOS, Android, and React Native so you can manage consent in your mobile apps. The SDKs use the same consent configuration you publish for your website, so your categories and banner content stay consistent everywhere.
The mobile SDKs let your app:
- Display a consent banner built from your published DataGrail configuration
- Save user preferences on the device and sync them to DataGrail
- Check consent by category before you start analytics or advertising SDKs
- React to consent changes when a user updates their preferences
- Keep working offline by queuing failed requests and retrying them later
- Share consent across devices with Universal Consent
Available SDKs
Each SDK is open source on GitHub. The repository README is the source of truth for installation, requirements, the full API reference, and a demo app.
| Platform | Repository | Package |
|---|---|---|
| iOS | datagrail/consent-ios | CocoaPods (DataGrailConsent) or Swift Package Manager |
| Android | datagrail/consent-android | Maven Central (io.datagrail:consent) |
| React Native | datagrail/consent-react | npm (@datagrail.io/react-native-consent) |
Watch the repository on GitHub to get notified about new releases. Each repository's releases page lists changes and upgrade notes.
Getting Started
Each SDK loads your consent configuration from a Config URL. Follow these steps to find the Config URL for a container:
- Navigate to Consent Management, Settings, Containers, and select the container you want your app to use.
- Under Publishing Details, turn on the Show Config URL toggle.
- Copy the Config URL that appears in the container details.
- Publish the container so the latest configuration is available at that URL.
Next, follow the installation and quick start steps in the README for your platform. The general flow is the same on every platform:
| Step | What It Does |
|---|---|
| Initialize | Start the SDK early in your app's lifecycle with your Config URL |
| Check consent | Ask the SDK whether the user still needs to make a choice |
| Show the banner | Display the consent banner when consent is needed |
| Gate tracking | Check whether a category is enabled before you start the SDKs in that category |
| Listen for changes | Update your tracking setup when the user changes their preferences |
Disclaimer: The information contained in this message does not constitute as legal advice. We would advise seeking professional counsel before acting on or interpreting any material.