> ## 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.

# Migration Guide

> Migrate from the legacy Flutter SDK (before 2.0.0) to the DARO 2.0 SDK.

**Update to DARO 2.0 SDK**

* Update the dashboard and app configuration before changing SDK dependencies and code.
* See the [DARO 2.0 SDK migration guide](/en/new-daro-sdk/migration-guide) for the overall sequence and [legacy SDK (before 2.0.0) support](/en/new-daro-sdk/legacy-support) for the support policy.

<Warning>
  Existing Ad Unit IDs continue to work with the DARO 2.0 SDK and do not need to be reissued or replaced. For new integrations or when copying a value, use the Ad Unit Key from the updated dashboard. Keep existing Ad Unit IDs in app versions that use the legacy SDK (before 2.0.0); newly created Ad Unit keys do not work with that SDK.
</Warning>

## 1. Update the dashboard

* In the DARO dashboard, select the app you are migrating and complete the update.
* Find the **Integration Key** and Ad Unit Keys for the Android app and the iOS app separately.

## 2. Remove legacy key files and settings

* Remove the legacy files used by your project: `daro-services.json`, `daro-service.json`, `daro-key.txt`, `android-daro-key.txt`, and `ios-daro-key.txt`.
* Remove the legacy integration settings that reference these files.
* On iOS, also check file references and build resources in Xcode.

## 3. Configure DARO integration tools

* Configure the build tools using the [Android migration guide](/en/sdk-integration-v2/android/migration-guide) and [iOS migration guide](/en/sdk-integration-v2/ios_new/migration-guide).
* Apply the `so.daro` plugin to the Android app module.
* On iOS, merge the `post_install` hook from [Flutter get started](/en/sdk-integration-v2/flutter/get-started) into the existing Flutter configuration.

## 4. Configure the Integration Key and app settings

* Use the Integration Key from the dashboard for the corresponding Android or iOS app.
* On Android, enter the key in `DARO_INTEGRATION_KEY` in `AndroidManifest.xml`.
* On iOS, enter the key in `DaroIntegrationKey` in the source `Info.plist`.
* See [Flutter get started](/en/sdk-integration-v2/flutter/get-started) for configuration examples.
* Run `pod install` after configuring the iOS hook and completing the SDK update below.

## 5. Update app-ads.txt

* Follow the [app-ads.txt guide](/en/app-ads-txt-settings) and publish the latest content provided by the dashboard.
* Confirm that the file is accessible on the website registered in the dashboard.

## 6. Update SDK dependencies and code

* Update `pubspec.yaml` to the `daro_flutter` version listed in [Flutter get started](/en/sdk-integration-v2/flutter/get-started).
* Remove any Podfile entry that directly pins the legacy SDK (before 2.0.0) and use the dependency provided by `daro_flutter`.
* Install the package with the following command.

```bash theme={null}
flutter pub get
```

### Initialization

* Load ads and display ad widgets only after `DaroFlutter.initialize()` completes.
* See [Flutter get started](/en/sdk-integration-v2/flutter/get-started) for the initialization example.

### Check each ad format

* Remove the `placement` constructor argument from `DaroInterstitialAd`, `DaroRewardedAd`, `DaroAppOpenAd`, and `DaroLightPopupAd`.
* Review loading, display, and cleanup in the format guides below.

| Ad format | What to check |
| - | - |
| [Banner / MREC](/en/sdk-integration-v2/flutter/ad-formats/banner) | Display ad widgets after initialization completes. |
| [Native](/en/sdk-integration-v2/flutter/ad-formats/native) | Update the factory implementation and registration, and accept and pass the AdChoices position argument in Android's `createAdBinder` and iOS's `createNativeAdView`. |
| [Interstitial](/en/sdk-integration-v2/flutter/ad-formats/interstitial) | Review the `DaroInterstitialAd` constructor and loading, display, and cleanup. |
| [Rewarded](/en/sdk-integration-v2/flutter/ad-formats/rewarded) | Review the `DaroRewardedAd` constructor and reward callback. |
| [App open](/en/sdk-integration-v2/flutter/ad-formats/appopen) | Review the `DaroAppOpenAd` constructor and loading, display, and cleanup. |
| [Light popup](/en/sdk-integration-v2/flutter/ad-formats/lightpopup) | Review the `DaroLightPopupAd` constructor and loading, display, and cleanup. |

## Verify before release

* Rebuild both Android and iOS apps.
* On a physical device, verify initialization and the loading, display, dismissal, and callbacks of every ad format your app uses.
* Also verify the reward callback if you use rewarded video ads.
* Keep existing Ad Unit IDs for released app versions that still use the legacy SDK (before 2.0.0).

## Migrating Privacy APIs

Replace boolean `hasGdprConsent`, `doNotSell`, and `isTaggedForChildDirectedTreatment` settings with `setGdpr(DaroGdprStatus)`, `setCcpa(DaroCcpaStatus)`, and `setCoppa(DaroCoppaStatus)`. Determine consent and applicability in your app, then await each call before initialization. See the [initialization example](/en/sdk-integration-v2/flutter/get-started#initializing-the-sdk).
