Skip to main content

Overview

The Adrop React Native SDK allows you to easily integrate various ad formats into your React Native app.

Supported Ad Formats


Requirements

React Native

  • React Native 0.71 or higher

Android

  • API level 23 (Android 6.0) or higher
  • compileSdkVersion 34
  • Kotlin 2.1.0 or higher
  • Gradle 8.7 or higher

iOS

  • iOS 13.0 or higher
  • Swift 5.0 or higher

Installation

1. Install Package

2. Android Setup

Add the backfill ad repository to android/settings.gradle.kts.
android/settings.gradle.kts
Add the Kotlin plugin and backfill dependency to android/app/build.gradle.
android/app/build.gradle
Add the backfill App ID to android/app/src/main/AndroidManifest.xml.
android/app/src/main/AndroidManifest.xml
Please contact Adrop to get your App ID.

3. iOS Setup

Modify ios/Podfile.
ios/Podfile
Install pods.

4. Info.plist Configuration

Add the following settings to ios/YourApp/Info.plist for backfill ads.
  • GADApplicationIdentifier: App ID for backfill ads
  • SKAdNetworkItems: Required for ad conversion tracking on iOS 14+
Info.plist
If your Info.plist already contains a SKAdNetworkItems key, do not add a new one — merge only the array (<array>) entries. Duplicate keys cause iOS to use only the first array.
Please contact Adrop for the full SKAdNetworkItems list and App ID.

Initialization

Initialize the SDK when your app starts. This is typically done in App.tsx or index.js.
App.tsx

Initialization Options

Parameters Example

Theme Settings

Set the UI theme for ads.

User Identifier Settings

Set the user identifier (UID) for targeted advertising.
UID is transmitted after being hashed with SHA-256. Do not directly pass personal information such as email or phone number.

Test Unit IDs

Use the following test unit IDs during development and testing.
Be sure to replace with actual unit IDs before production deployment.

Error Codes

Error codes that may occur in the SDK.

Troubleshooting

iOS Build Error

If you encounter Swift version compatibility issues, add the following to the post_install block in ios/Podfile.
ios/Podfile

Android Build Error

If the Kotlin version doesn’t match, check the Kotlin version in android/build.gradle.
android/build.gradle

Next Steps

Banner Ads

Implement banner ads

Native Ads

Implement native ads

Interstitial Ads

Implement interstitial ads

Rewarded Ads

Implement rewarded ads

WebView Guide

Display web ads in WebView

UMP Integration

GDPR/CCPA consent management

Popup Ads

Implement popup ads

Splash Ads

Configure splash ads

Targeting

Set up user and context targeting

Reference

Complete API reference

Examples

Full implementation examples