(Difference between revisions)
Jump to: navigation, search
(TapticaAdManager Mandatory Methods)
Line 112: Line 112:
'''- (BOOL)setTapticaAdApplicationID:(NSString*)appID;'''
'''- (BOOL)setTapticaAdApplicationID:(NSString*)appID;'''
Sets the application ID (appID) as generated in the TapticaDevelopment Site.
Sets the application ID (appID) as generated in the TapticaDevelopment Site.
== TapticaAdManager Optional Methods ==
== TapticaAdManager Optional Methods ==

Revision as of 15:50, 21 August 2012


Steps to Integration

To integrate with TapticaAd™ SDK, follow these steps: 1. Application/Site Id – Retrieve your app/site Id from Taptica’s account manager. 2. Download TapticaAd™ iOS SDK – download the iOS SDK from the Tapticadeveloper’s website. 3. Implement TapticaAd™ iOS SDK – implement the iOS SDK in your app so that it can be used. 4. Call TapticaAd™ iOS SDK – perform ad requests.

Application/Site ID Taptica Ad

Retrieve your Application Id from Taptica’s account manager or register to the TapticaAd™ service via Taptica’s website – At the end of the process you will acquire an Application ID. Save it for future use, it will be needed when identifying your application/site while using the TapticaAd™ iOS SDK.

Downloading TapticaAd™ iOS SDK

Following download, you can extract the downloaded file which contains the following items:

1.Static Library: libTapticaAd.a

2.Header file: TapticaAd.h

3.Sample project

Implementing TapticaAd™ iOS SDK

To implement the TapticaAd™ iOS SDK:

1. Use the system Finder to drag the unzipped SDK folder into your project.

2. Drag and drop the folder to your project xcode group tree.

3. Update your application delegate header file with:

    #import "TapticaAd.h"
        TapticaAdManager *TapticaAdManager;

For example:

    #import <UIKit/UIKit.h>
    #import "TapticaAd.h"
    @class TapticaAdTestViewController;
    @interface TapticaAdTestAppDelegate : NSObject <UIApplicationDelegate> {
      UIWindow *window;
      TapticaAdTestViewController *viewController;
      TapticaAdManager *TapticaAdManager;
    @property (nonatomic, retain) TapticaAdManager *TapticaAdManager;
    @property (nonatomic, retain) IBOutlet UIWindow *window;
    @property (nonatomic, retain) IBOutlet TapticaAdTestViewController *viewController;

4. Inside “"applicationDidFinishLaunching:" in your delegate m file add:

TapticaAdManager = [TapticaAdManager instance];

[TapticaAdManager setTapticaAdApplicationID:@"YOUR_APPLICATION_ID"];

For example:

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    // Override point for customization after application launch.
    TapticaAdManager = [TapticaAdManager instance];
    [TapticaAdManager setTapticaAdApplicationID:@"YOUR_APPLICATION_ID"];
    // Add the view controller's view to the window and display.
    [self.window addSubview:viewController.view];
    [self.window makeKeyAndVisible];
    return YES;

Calling the TapticaAd™ iOS SDK

To call the TapticaAd™ iOS SDK:

1.In your view controller header add:

    #import "TapticaAd.h"
    TapticaAdView *TapticaAdView;

2.In your view controller m file inside viewDidLoad add:

    TapticaAdView = [[TapticaAdView alloc] init];
    CGRect frame = [[TapticaAdView view] frame];
    frame.origin.y = 412.0;//the frame.origin.y can be customized.
    [[TapticaAdView view] setFrame:frame];
    [self.view addSubview:[TapticaAdView view]];
    [TapticaAdView requestAdd];

For banner ad use:

    [TapticaAdView requestAd];

For full screen ad use:

    [TapticaAdView requestFullScreenAd];

When requesting banner ad, it will appear & refreshed until removed from super view. It is possible to request full screen ad while banner ad are displaying. When requesting full screen while banner ad displaying the banner ad will be paused and not refreshed.

Common Classes

The API in the SDK is composed of 2 basic classes:

1.TapticaAdView– an ad view that simply shows an ad. This view only shows an ad after you have requested an ad. It is implemented using requestAd or requestFullScreenAd

2.TapticaAdManager– a module class that manages all TapticaAdView class instances and the extra data that can be transferred to the server for each ad request.

TapticaAdManager Mandatory Methods

- (BOOL)setTapticaAdApplicationID:(NSString*)appID;

Sets the application ID (appID) as generated in the TapticaDevelopment Site.

TapticaAdManager Optional Methods

- (BOOL)setTapticaAdIncome:(int)income; Sets the user estimated income. - (BOOL)setTapticaAdKeywords:(NSString *)keywords; Sets the keywords to be sent to the server for each ad request. For example, with an application for toddlers, you might consider using “kids children toys” as keywords. - (BOOL)setTapticaAdUserPostalCode:(int)postalCode; Sets the user zip code. - (BOOL)setTapticaAdUserAreaCode:(int)areaCode; Sets the user area code. - (BOOL)setTapticaAdUserBirthdate:(NSString *)date; Sets the user birthday with format yyyymmdd. - (BOOL)setTapticaAdMartialStatus:(int)status; Sets the user marital status as follow: 0 = unknown, 1 = single, 2 = divorced, 3 = engaged, 4 = relationship, 5 = swinger - (BOOL)setTapticaAdUserGender:(int)gender; Sets the user gender as follows: 0 = unknown, 1 = male, 2 = female - (BOOL)setTapticaAdEducation:(int)education; Sets the user education as follows: 0 = unknown, 1 = UG, 2 = PG - (BOOL)setTapticaAdInterests:(NSString *)interests; Sets user interests.

Personal tools