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