UniConsent Mobile SDK: Sync Native Consent to WebViews

UniConsent

3 min read
Table of contents

Mobile apps embed web content in WebViews all the time: a subscription page, an advertiser landing page, a help article. If the user has already given consent in the native app, showing a second consent banner inside that WebView is inconsistent. The UniConsent Mobile SDK solves this with WebView consent sync.

UniConsent Mobile SDK: Sync Native Consent to WebViewsUniConsent Mobile SDK: Sync Native Consent to WebViews

News apps, publisher apps, and ad-supported apps all open web pages inside the same experience rather than pushing users to an external browser.

When a web page loads inside a WebView, the UniConsent CMP tag has no way of knowing whether consent was already collected natively. Without sync, it shows the banner again.

Under the EU GDPR and UK GDPR, consent must be informed and freely given. Re-requesting consent the user has already provided is poor practice and raises questions about whether your consent signals are being passed correctly to downstream ad and analytics systems.

Before the WebView loads its URL, the SDK injects the native consent status into the page. The CMP tag on that page reads the injected consent and treats it as an existing valid record. The banner does not appear.

Injection happens before page scripts run, so the consent data is available from the moment the page initialises. A CMP tag that loads before the injection finds no consent record and shows the banner regardless.

Supported Platforms

WebView consent sync is available across all four Mobile SDK targets:

  • iOS: call syncConsent(to:) before loading the WebView URL
  • Android: call syncConsent in onPageStarted, before the CMP tag runs
  • Flutter: call syncConsent inside the onPageStarted delegate
  • React Native: pass the consent script via injectedJavaScriptBeforeContentLoaded

What Else the Mobile SDK Covers

The Mobile SDK also covers:

  • IAB TCF 2.3 consent management for GDPR-regulated traffic, with TC String output for downstream ad systems
  • CCPA support for US users
  • Apple ATT integration for iOS, requesting App Tracking Transparency permission alongside the consent flow
  • Google Consent Mode signals for Firebase Analytics on both iOS and Android
  • AAP integrations for Firebase, Adjust, Airbridge, AppsFlyer, and Branch. From SDK version 25.6.1, consent is forwarded automatically without manual configuration.

Pricing

The Mobile SDK is available as an add-on to any UniConsent plan at £50 per app per month.

Getting Started

Reach out via the UniConsent dashboard or email hello@uniconsent.com; support will send over the SDK package for your platform. Integration guides are available for iOS, Android, Flutter, and React Native.

Activate Google Consent Mode UniConsent to enhance the accuracy of your Google Analytics and Google Ads conversion data.

Set up Google Consent Mode →

Get started to make your website and application compliant for EU GDPR, US CPRA, CA PIPEDA etc

Sign up

Get started to make your website and application compliant for EU GDPR, US CPRA, CA PIPEDA etc

Sign up