Initialization
Import and configure AATKit
Import modules
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:
Initialize AATKit
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. Please see the example below where AATKit is initialized with test mode using ID 136
:
Add optional networks
Optional networks are disabled by default. If you want to include them to the build, follow instructions below.
Android
Find
node_modules/@addapptr/react-native-aatkit/android/build.gradle
file.Uncomment network dependencies which should be included to the build.
iOS
Find
node_modules/@addapptr/react-native-aatkit/RNAatkit.podspec
file.Uncomment network dependencies which should be included to the build.
Last updated