Wiki
Clone wikiAATKit iOS / AATKit Integration Advanced
Advanced features
- Project Setup
- AATKit Initialisation
- Banner Integration
- Fullscreen Integration
- APP Open Integration
- Native Ads Integration
- Native Ads Integration - special ad network characteristics
- Promo Screen
- Sample
- Disable App Transport Security (ATS)
- Advanced Features
- Targeting
- Rewarded Video
- Frequency Capping
- Header documentation
- Important Remarks
- AATKit's Size within your app
- What is an AdSpace?
- Network-specific Information
- Statistics Delegate
- Reports Delegate
- Listen to impression level information
- AATKit AdMob custom events adapter (>= 2.77.x)
AATKit Changelogs
In case you project uses multiple view controller which shall display Ads, the corresponding view controller the AATKit has to use changes.
Changing the view controller can be done via the class method:
#!objective-c + (void) setViewController:(UIViewController*)con;
This means, the view controller passed to the AATKit may has to change, based on which view controller of your application is on top of the view controller hierarchy.
Example call:
Objective-C:
#!objective-c [AATKit setViewController: self];
#!swift AATKit.setViewController(self)
This is true for fullscreen and banner placements. Even though banner placements provide a UIView instance, the displayed Ad within may trigger a push of another view controller on top, in case of a banner click.
You should also read about the Limitations of the individual ad networks.
Disable Ad networks
Disable Ad Networks at Compile Time
The AATKit will check for the presence of all supported network SDKs, at runtime. If an ad network SDK is found the AATKit will use it. If you want to avoid this, open the file AATConfig.m , which is located in the aat folder in Xcode. Set the boolean for the network you wish AATKit to ignore to NO.
Remove Ad Network SDKs at Compile Time
You can also disable ad networks by removing/deleting ad networks SDKs from your Xcode project or simply delete the undesired ad network SDK from the subSDK folder. The AATKit will not find this ad network at runtime, and not serve ads via this network. Your app will still compile and run, despite having deleted an ad network SDK.
Disable/Enable Ad Networks at Runtime
NOTE: Disabling ad networks at compile time (see above) will always override runtime settings.
To disable ad networks at runtime, you can call:
Objective-C:
#!objective-c [AATKit disableAdNetwork:]
#!swift AATKit.disableAdNetwork(AATKitAdNetwork.<AdNetwork>)
If you want to enable an ad network that has been disabled earlier, call:
Objective-C:
#!objective-c [AATKit reenableAdNetwork:]
#!swift AATKit.reenable(AATKitAdNetwork.<AdNetwork>)
In both cases, you have to pass the network identifier from the AATKitAdNetwork
enumeration as the argument.
Geo Tracking (AATKit >= 2.67.0-beta0)
AddApptr and some of the ad networks included in AATKit will make use of location services, if your app is authorized to do so.
Ad networks that use location services are:
- AdMob
- AdX
- AppNexus
- DFP
- InMobi
- MoPub
- Smaato
- SmartAd
Note: Geo tracking is disabled by default. If you want to give AATKit access to your geo data, please enable geo tracking with the AATConfiguration
object handed over when initializing the AATKit.
Enabling and disabling geo tracking (AATKit >= 2.67.0-beta2)
Configure AATKit like this:
Objective-C:
#!objective-c AATConfiguration* aatConfiguration = [[AATConfiguration alloc] init]; aatConfiguration.shouldUseGeoLocation = YES; [AATKit initializeWithConfiguration:aatConfiguration];
#!swift let aatConfiguration = AATConfiguration() aatConfiguration.shouldUseGeoLocation = true AATKit.initialize(with: aatConfiguration)
Objective-C:
#!objective-c AATRuntimeConfiguration* aatRuntimeConfiguration = [[AATRuntimeConfiguration alloc] init]; aatRuntimeConfiguration.shouldUseGeoLocation = YES; [AATKit reconfigureUsingConfiguration: aatRuntimeConfiguration];
#!swift let aatRuntimeConfiguration = AATRuntimeConfiguration() aatRuntimeConfiguration.shouldUseGeoLocation = true AATKit.reconfigure(using: aatRuntimeConfiguration)
Enabling and disabling geo tracking (AATKit < 2.67.0)
To disable geo tracking, you can call:
Objective-C:
#!objective-c [AATKit disableGeoTracking];
#!swift AATKit.disableGeoTracking()
If you want to enable geo tracking again, you can call:
Objective-C:
#!objective-c [AATKit enableGeoTracking];
#!swift AATKit.enableGeoTracking()
Important: The methods +enableGeoTracking
and +disableGeoTracking
will be removed with version 2.67.0.
back (Disable App Transport Security (ATS))
next (Targeting)
Updated