This page walks through setting up a mobile app. For every prop, hook and method, see the React Native SDK reference.
What you need
- A Mobile App account in CookieChimp. To set one up, choose Mobile App when you add an account, and our team will help you get started.
- Your Account ID, shown on the SDK Setup page of that account.
- React Native 0.80 or newer (Expo SDK 54 or newer) and React 18 or newer.
Install the SDK
npx pod-install afterwards.
Add the provider
Wrap your app withCookieChimpProvider and pass your Account ID:
Let users change their choice
Apps don’t show a floating cookie icon. Instead, add a Privacy settings row to your app’s settings screen and open the preferences from it:Choose which banner applies
CookieChimp picks the banner for the user’s region, so GDPR (opt-in) and CCPA (opt-out) rules apply in the right places. Tell the SDK the region in one of two ways:- Pass
country(such as"DE"or"US-CA") when your app already knows where the user is. - Set
geolocationtotrueto let CookieChimp look up the country.
Design the banner
Everything in the Banner Designer applies to your app: layout, position, button placement, colors, dark mode, corner radius, logos, copy and translations. Banners and preferences animate in and out, and the animations are skipped when the device asks for reduced motion. Mobile App accounts also get a Full Screen layout. It covers the whole screen with your logo, title and copy, with the buttons pinned to the bottom. When the banner uses Full Screen, the preferences open full screen too.Describe your SDKs
Mobile SDKs don’t set cookies, so instead of a cookie list each vendor in your preferences shows what the SDK collects. These labels follow Apple’s App Privacy details and Google Play’s Data safety section, so you can reuse the answers you gave the app stores:
In Vendor Management, choose Add from library to add common SDKs such as Firebase, Amplitude, AppsFlyer, Sentry and Google AdMob with these labels already filled in. Edit any SDK to review its labels under App data.
Start and stop SDKs with consent
Register each vendor once. CookieChimp callsonStart when the user allows it and onStop when they withdraw consent:
useCategory("analytics") hook. See the SDK reference for more.
Consent records
Each decision is stored on the device and then sent to CookieChimp. Records are queued and retried while the device is offline. They appear in your Consent Log marked as iOS or Android, so you can prove consent for app users the same way as for website visitors.Ship your settings inside the app (optional)
If your app must not download its settings, go to SDK Setup, choose offline mode, download the configuration JSON and pass it asconfig:
Next steps
- React Native SDK reference: every provider prop, hook and method.
- Banner Designer: design the banner and preferences.
- Consent Log: see the records your app sends.