Skip to main content

Before You Begin

SDK Initialization RequiredLoad or render all ad formats only after SDK initialization completes. Rendering before initialization causes:AdBannerView | NativeAdView is mounted before the initialization of the DaroM React Native moduleApplies to all formats: banner, native, interstitial, rewarded.
Check requirements before integration.

Requirements

  • Android minSdkVersion: 23
  • iOS 15.1 or higher
Verify app-ads.txt settings before proceeding.

App Setup

Follow setup steps for your ad type (Non-Reward or Reward) confirmed in Before Integration.If using daro-m, select Reward tab.

Add npm Package

Install appropriate package:
npm i react-native-daro

Android Project Setup

  • Android minSdkVersion: 23
Desugaring required: Configure desugaring if minSdk is below 26.

1

Project-level Build Configuration

  1. Add maven repositories to the settings.gradle file.
2

Add the DARO plugin to build.gradle(root)

  1. Add the DARO plugin to the build.gradle(root) file.
Latest version
  • daro-plugin: androidPlguinLatestVersion
3

Add Daro SDK

  1. Add the Daro SDK.
Latest version
  • daro-a: androidDaroLatestVersion
4

Add android-daro-key.txt file

  1. Add the android-daro-key.txt file.
android-daro-key.txt can be downloaded from the DARO dashboard.
5

Configure daroAppKey

  1. Configure the daroAppKey.
The daroAppKey can be found in the DARO dashboard.daroAppKey
6

Apply the DARO plugin in build.gradle(app)

  1. Apply the DARO plugin in build.gradle(app).
7

Add proguard rules

  1. Add proguard rules.

iOS Project Setup

  • iOS 15.1 or higher
  • Xcode 14.0 or higher
  • Open ios/PROJECT_NAME.xcworkspace and add the ios-daro-key.txt file by drag and drop. ⚠️ The ios-daro-key.txt file must be included in the project to initialize the SDK.
    GADApplicationIdentifier, DaroAppKey can be found in the DARO dashboard (AdMob Key, App Key).
    ❗ Please copy the SKAdNetworkItems from Info.plist to your app’s Info.plist. If not registered, ad demand sources cannot receive conversion performance reports, which will reduce advertising efficiency. This has a significant impact on ad performance, so please add it!
  • Add the following IDs to Info.plist.

Initialize SDK

Initialize SDK using code below:

Best Practices

SDK Initialization Management

Recommended practices to manage SDK efficiently and prevent errors.
  1. Call initialize() at app startup
    • Initialize at app entry point (App.js or index.js)
  2. Manage initialization state
    • Track initialization completion to control ad rendering timing
  3. Protect banner and native ad components with conditional rendering
    • Ensure components don’t render before initialization completes