> For the complete documentation index, see [llms.txt](https://aatkit.gitbook.io/aatkit-react-native-integration/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://aatkit.gitbook.io/aatkit-react-native-integration/start/initialization.md).

# Initialization

Import and configure AATKit

### Import modules <a href="#markdown-header-importing-modules" id="markdown-header-importing-modules"></a>

There are three modules you can import to use AATKit:

* `RNAatkit` – main module which allows to initialize plugin. Also provides API to reload and show interstitial ads.
* `RNAatkitBanner` – the banner ad component.
* `RNAatkitNativeAd` – the native ad component.

Example of importing modules:

```javascript
import {
    RNAatkit,
    RNAatkitBanner,
    RNAatkitNativeAd
} from '@addapptr/react-native-aatkit'
```

### Initialize AATKit <a href="#markdown-header-initialize-aatkit" id="markdown-header-initialize-aatkit"></a>

Use `initWithConfiguration` function from `RNAatkit` module to initialize AATKit. This operation should be run only once during the application lifecycle. You can pass JSON object as the parameter to set desired configuration. You can find all configuration options [here](/aatkit-react-native-integration/other/reference/rnaatkit/functions/initwithconfigurationandcallback.md). Please see the example below where AATKit is initialized with test mode using ID `136`:

```javascript
componentWillMount() {
    RNAatkit.initWithConfiguration({
        testModeAccountID: 136,
        consent: {
            type: RNAatkit.ConsentType_ManagedCMPGoogle
        }
    });
}
```

{% hint style="info" %}
Make sure to remove the `testModeAccountID` from your `configuration` object before you publish your app to the store. Otherwise, your app will not earn any ad revenue.
{% endhint %}

### Add optional networks <a href="#markdown-header-adding-optional-networks" id="markdown-header-adding-optional-networks"></a>

Optional networks are disabled by default. If you want to include them to the build, follow instructions below.

#### Android <a href="#markdown-header-android" id="markdown-header-android"></a>

1. Find `node_modules/@addapptr/react-native-aatkit/android/build.gradle` file.
2. Uncomment network dependencies which should be included to the build.

#### iOS <a href="#markdown-header-ios" id="markdown-header-ios"></a>

1. Find `node_modules/@addapptr/react-native-aatkit/RNAatkit.podspec` file.
2. Uncomment network dependencies which should be included to the build.<br>
