Display backfill ads in WebView within your React Native app. The Adrop SDK provides a useAdropWebView hook for easy integration, as well as a manual registerWebView API.
react-native-webview’s ref is an imperative handle, so findNodeHandle does not work directly on it. You must wrap the WebView in a View and use that View’s ref instead.
If your app opens non-own-domain URLs in an external browser, you must ensure that ad resource requests (e.g., googleads.g.doubleclick.net) are not blocked.Ad resources such as iframes and scripts are loaded automatically by the ad SDK — they are not user-initiated navigations. Only redirect user-initiated navigations to an external browser.
import { Linking } from 'react-native'const allowedHost = 'my-domain.com'<WebView source={{ uri: 'https://my-domain.com' }} style={{ flex: 1 }} javaScriptEnabled={true} thirdPartyCookiesEnabled={true} mediaPlaybackRequiresUserAction={false} allowsInlineMediaPlayback={true} onShouldStartLoadWithRequest={(request) => { const url = request.url const host = new URL(url).host // Only redirect user-initiated navigations to external browser // Ad resources (e.g., googleads.g.doubleclick.net) load via iframes/scripts, // not user clicks — do not block them if (!host.includes(allowedHost) && request.navigationType === 'click') { Linking.openURL(url) return false } return true }}/>
Do not block or redirect all non-own-domain requests. Ad resources like googleads.g.doubleclick.net are loaded automatically during the backfill ad process and must be allowed to load within the WebView.