Wiki

Clone wiki

AATKit iOS / AATKit2 / Documentation_old

Installing

Download the AATKit using the link on the Home page. If your browser did not automatically unzip it, do that now.

In Xcode open your project. Then use File and Add Files to ... and choose the folder you just unzipped (aat usually). Make sure Create Groups for any added folders is checked.

-You must add -ObjC to Other Linker Flags under Build Settings.

If you are using ARC you need to add the flag -fno-objc-arc for all source (*.m) files. See here for details.

You must also add several Frameworks to your project and add "/usr/include/libxml2" in Header Search Paths.

If your project already includes JSON or Reachability or an Ad Network SDK please see below in Excluding Ad Networks on how to remove one copy of it. If you see duplicate symbol errors during linking this is the most probable cause.

Integration

Follow these steps to integrate AATKit ads into your project:

Adding banner placement

1. Import AATKit header file

#import "AATKit.h"

2. Initialize AATKit before creating any placements.
Use the test mode before your app has been registered with the ad networks to receive test advertising. You can find your Test ID in the welcome email you received from us. Remember to disable test mode before you submit to the app-store!

[AATKit enableTestModeWithID:ENTERYOURTESTAPPIDHERE]; // The ID is an (int) not an (NSString)! Use only during testing!
[AATKit initWithViewController:rootViewController andDelegate:nil];

3. Create banner placement.

id bannerPlacement;
if ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad) bannerPlacement = [AATKit createPlacementWithName:@"BannerPlacement" andType:AATKitBanner768x90];
else bannerPlacement = [AATKit createPlacementWithName:@"BannerPlacement" andType:AATKitBanner320x53];

4. Add placement view to your view.

UIView *bannerPlacementView = [AATKit getPlacementView:bannerPlacement];
[view addSubview:bannerPlacementView];

5. Start banner placement auto-reloading to download new ads automatically.

[AATKit startPlacementAutoReload:bannerPlacement];

Adding fullscreen placement

1. Import AATKit header file

#import "AATKit.h"

2. Initialize AATKit before creating any placements.
Use the test mode before your app has been registered with the ad networks to receive test advertising. You can find your Test ID in the welcome email you received from us. Remember to disable test mode before you submit to the app-store!

[AATKit enableTestModeWithID:ENTERYOURTESTAPPIDHERE]; // The ID is an (int) not an (NSString)! Use only during testing!
[AATKit initWithViewController:rootViewController andDelegate:nil];

3. Create fullscreen placement.

id fullscreenPlacement = [AATKit createPlacementWithName:@"FullscreenPlacement" andType:AATKitFullscreen];

4. Start fullscreen placement auto-reloading to automatically download new fullscreen ad after presenting the current one.

[AATKit startPlacementAutoReload:fullscreenPlacement];

5. Show fullscreen placement.

[AATKit showPlacement:fullscreenPlacement];

Samples

See Samples to learn more and check Methods for details.

You should also read the Limitations of the individual ad networks.

Excluding Ad Networks

In Xcode open the aat folder, then open the subSDKs folder. Then locate the network you want to exclude, right-click on it and choose Delete. If asked, choose Remove References. You have just removed that ad network SDK.

AATKit will check for the presence of all network SDKs it supports during runtime. If it finds one, it will use it. Therefore, if you link against one of the supported network SDKs yourself, it will still find and use it. 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.

Updated