Clone wiki

AATKit iOS / AATKit Initialisation

Using the AddApptr SDK in your iOS project

  1. Project Setup
  2. AATKit Initialisation
  3. Banner Integration
  4. Fullscreen Integration
  5. APP Open Integration
  6. Native Ads Integration
  7. Native Ads Integration - special ad network characteristics
  8. Promo Screen
  9. Sample
  10. Disable App Transport Security (ATS)
  11. Advanced Features
  12. Targeting
  13. Frequency Capping
  14. Header documentation
  15. Important Remarks
  16. AATKit's Size within your app
  17. What is an AdSpace?
  18. Network-specific Information
  19. Statistics Delegate
  20. Reports Delegate
  21. Listen to impression level information
  22. AATKit AdMob custom events adapter (>= 2.77.x)

AATKit Changelogs

Initialisation (Code Sample)

Initialise the AATKit by calling the class method:

+ (void)initializeWithConfiguration:(nullable AATConfiguration*)configuration

configuration: Allows for providing configuration parameter to the AATKit.

Initialising the AATKit has to be done before any Ad can be displayed.
 During this process, the AATKit contacts the AddApptr servers for Ad network configurations, which are necessary for authenticating towards the various Ad networks.

Note: Since AATKit 2.66.10 you are able to reconfigure AATKit. To do so, you can use the class method:

+ (void)reconfigureUsingConfiguration:(nonnull AATRuntimeConfiguration*)configuration

configuration: Contains new runtime information. Only properties in AATRuntimeConfiguration are considered.

Use your TestID to test your application

Use the accountID for receiving example Ads. The accountID can be set in your AATConfiguration object. The accountID will be sent to you after registering at

@property (nullable) NSNumber* testModeAccountID;

Example usage:


    AATConfiguration* aatConf   = [[AATConfiguration alloc] init];
    aatConf.testModeAccountID   = <<your account ID>>;
    [AATKit initializeWithConfiguration:aatConf];
    let aatConf = AATConfiguration()
    aatConf.testModeAccountID = <<your account ID>>
    AATKit.initialize(with: aatConf)

The AddApptr SDK identifies your app using the bundleID from the Apple app store. For the identification to work properly, it is important to disable the test-mode before going public with your app. Simply do not set the testModeAccountID property.

Remember to disable test mode before you submit to the app-store! Disabling is done by omitting the testID.

Activate the debug mode

To see debug output in the Xcode console, you can use the following method before initializing AATKit:

+ (void)debug:(bool)flag; //default is set to NO

Example usage:


[AATKit debug:YES];

Set the view controller

You can set the view controller for your ad requests on the AATConfiguration object when initializing the AATKit:


AATConfiguration* aatConfiguration = [[AATConfiguration alloc] init];
aatConfiguration.defaultViewController = self;
[AATKit initializeWithConfiguration:aatConfiguration];
let aatConfiguration = AATConfiguration()
aatConfiguration.defaultViewController = self
AATKit.initialize(with: aatConfiguration)

You should set the view controller every time you change to another view controller, on which you want to display ads:


[AATKit setViewController:self];

There are also special APIs for setting the view controller, e.g. for native ads. Please take a look at these chapters to learn more about that.

Important: For some ad networks, like the Google ad networks, you always have to set the view controller when performing an ad request, because they will ignore any ad request that doesn't hand over a view controller.

Listening to the reports requests

You can listen to all reports API requests by conforming to protocol AATReportsDelegate and pass that class (which conforms to the protocol) to AATConfiguration while initialising AATKit


class AppDelegate: UIResponder, UIApplicationDelegate {
    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: 
        [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        let configuration = AATConfiguration()
        configuration.reportsDelegate = self
        AATKit.initialize(with: configuration)
extension AppDelegate: AATReportsDelegate {
    func onReportSent(_ report: String) {
        print("onReportSent \(report)")

For how to add handle consent in your project please refer to Consent Handling Guide

back (Project Setup)

next (Banner Integration)