> ## Documentation Index
> Fetch the complete documentation index at: https://guide.daro.so/llms.txt
> Use this file to discover all available pages before exploring further.

# React Native Migration Guide

> Migrate to the latest DARO React Native SDK with platform-specific updates.

export const androidPlguinLatestVersion = '1.0.13';

export const androidDaroMLatestVersion = '1.3.15';

## Project Setup

Update both Android and iOS project settings:

<Accordion title="Android Project Setup" icon="sparkles">
  <Steps>
    <Step title="Project-level Build Configuration">
      Change the `daro-plugin` dependency.

      <Info>
        Latest version

        * daro-plugin: {androidPlguinLatestVersion}
      </Info>

      <CodeGroup>
        ```kotlin kotlin {12} theme={null}
        buildscript {
            repositories {
                google()
                mavenCentral()
                maven { url = uri("https://artifacts.applovin.com/android") }
            }
            dependencies {
                // as-is
                // classpath("com.github.delightroom:daro-android-plugin:0.4.4")

                // to-be
                classpath("so.daro:daro-plugin:{version}")
                classpath("com.applovin.quality:AppLovinQualityServiceGradlePlugin:5.5.2")
            }
        }
        ```

        ```groovy groovy {12} theme={null}
        buildscript {
            repositories {
                google()
                mavenCentral()
                maven { url 'https://artifacts.applovin.com/android' }
            }
            dependencies {
                // as-is
                // classpath 'com.github.delightroom:daro-android-plugin:0.4.4'

                // to-be
                classpath 'so.daro:daro-plugin:{version}'
                classpath 'com.applovin.quality:AppLovinQualityServiceGradlePlugin:5.5.2'
            }
        }
        ```
      </CodeGroup>
    </Step>

    <Step title="Apply the DARO plugin in build.gradle(app)">
      <CodeGroup>
        ```kotlin kotlin {7} theme={null}
        plugins {
            ...
            // as-is
            // id("droom.daro.m")

            // to-be
            id("so.daro.m")
            ...
        }
        ```

        ```groovy groovy {7} theme={null}
        plugins {
            ...
            // as-is
            // id 'droom.daro.m'

            // to-be
            id 'so.daro.m'
            ...
        }
        ```
      </CodeGroup>
    </Step>

    <Step title="Key file configuration">
      1. Delete `daro-services.json` and download `daro-key.txt` and add it as follows.

         * If using common configuration without flavor distinction

         ```
         app/
         └── daro-key.txt
         ```

         * If using different configuration by flavor

         ```
         app/
         └── src/
             ├── debug/
             │   └── daro-key.txt
             └── release/
                 └── daro-key.txt
         ```

               <Note>
                 `daro-key.txt` can be downloaded from the DARO dashboard.
               </Note>

      2. Add `daroAppKey` to the `gradle.properties` file.
         ```properties {1} theme={null}
         daroAppKey={APP_KEY}
         ```

      <Note>
        The daroAppKey can be found in the DARO dashboard.

        <img src="https://mintcdn.com/delightroom-5a71a6a8/zubkjN5vMaM7lt41/sdk-integration/android/img/appkey_sample.png?fit=max&auto=format&n=zubkjN5vMaM7lt41&q=85&s=f233dd9e626ee9f7ff43100b33f83e4e" alt="daroAppKey" width="300" data-path="sdk-integration/android/img/appkey_sample.png" />
      </Note>
    </Step>

    <Step title="Add Daro SDK dependency">
      Add the dependency as follows.

      <Info>
        Latest version

        * daro-m: {androidDaroMLatestVersion}
      </Info>

      <CodeGroup>
        ```kotlin kotlin {3} theme={null}
        dependencies {
            ...
            implementation("so.daro:daro-m:{version}")
            ...
        }
        ```

        ```groovy groovy {3} theme={null}
        dependencies {
            ...
            implementation 'so.daro:daro-m:{version}'
            ...
        }
        ```
      </CodeGroup>
    </Step>
  </Steps>
</Accordion>

<Accordion title="iOS Project Setup" icon="sparkles">
  * `daro-service.json` -> changed to `ios-daro-key.txt`
  * Info.plist: Configure `DaroAppKey`

  <Note>
    `ios-daro-key.txt` can be downloaded from the DARO dashboard.
  </Note>

  <Note>
    `DaroAppKey` can be found in the DARO dashboard.
  </Note>

  For more details, please refer to the [integration documentation](/en/sdk-integration/ios_new/get-started)
</Accordion>

## Code Implementation

<Steps>
  <Step title="Change Ad Unit Id used for ad load">
    The Ad Unit Id used previously is not available in the new SDK.<br />
    Therefore, please get the changed Ad Unit Id from the Daro dashboard and apply it to your code.

    <Danger>
      Using the existing Ad Unit Id will cause ad load failures. Please make sure to replace the Ad Unit Id.
    </Danger>
  </Step>

  <Step title="Remove extraParameter, localExtraParameter, placement">
    Support for methods that set extraParameter, localExtraParameter, and placement when loading ads has been discontinued.
    If you were using these fields previously, they must be removed.
  </Step>

  <Step title="Remove refreshSeconds for Banner/MREC/Native">
    A feature has been added to control refreshSeconds remotely from the daro dashboard instead of directly controlling it on the client.
    If you were changing refreshSeconds previously, please remove that field and apply refreshSeconds from the dashboard.
  </Step>

  <Step title="Apply ad callback parameter changes">
    The internal fields of AdInfo, AdLoadFailedInfo, and AdDisplayFailedInfo provided in existing ad callbacks have been changed.
    Please review the callbacks you were using accordingly.
  </Step>
</Steps>
