Class Methods

startWithAppId:modules:

+(void)startWithAppId:(NSString*)appId modules:(NSArray*)modules

Initialization of the AdToApp SDK on startup.

@appId is taken from the instruction on the adtoapp.com website

@modules is an array of constants that are used to show ads in your application. Each them must be one of following constants:

ADTOAPP_IMAGE_INTERSTITIAL
ADTOAPP_VIDEO_INTERSTITIAL
ADTOAPP_INTERSTITIAL
ADTOAPP_REWARDED_INTERSTITIAL
ADTOAPP_BANNER

For performance reasons, it is strongly recommended to exclude constants that are not used to show ads. If you want to show small banners, include ADTOAPP_BANNER constant in this array.

setDelegate:

+(void)setDelegate:(id<AdToAppSDKDelegate>)delegate

Sets the delegate to respond to messages from fullscreen ads and thus respond to, and in some affect, operations such as appearance/disappearance of advertising on/from screen, clicking, receiving of reward, first load of an ad and failure to display ad.

isInterstitialDisplayed

+(BOOL)isInterstitialDisplayed

A boolean value that determines whether there is an ad on the screen or not.

enableDebugLogs

+(void)enableDebugLogs

Enables verbose console logs for debugging purpurses.

enableTestMode

+(void)enableTestMode

Enables test mode.

showInterstitial:

+(BOOL)showInterstitial:(NSString*)typeOfInterstitial

Shows interstitial ads. Can only be called from the main thread.

warning: It is strongly recommended to use ADTOAPP_INTERSTITIAL to show ads because this will maximize revenue.

Parameters

typeOfInterstitial Can be one of ADTOAPP_IMAGE_INTERSTITIAL, ADTOAPP_VIDEO_INTERSTITIAL, ADTOAPP_INTERSTITIAL, ADTOAPP_REWARDED_INTERSTITIAL.

showInterstitial:fromViewController:

+(BOOL)showInterstitial:(NSString*)typeOfInterstitial fromViewController:(UIViewController*)vc

Shows interstitial ads. Can only be called from the main thread.

Parameters

typeOfInterstitial can be ADTOAPP_IMAGE_INTERSTITIAL, ADTOAPP_VIDEO_INTERSTITIAL, ADTOAPP_INTERSTITIAL or ADTOAPP_REWARDED_INTERSTITIAL. It is strongly recommended to use ADTOAPP_INTERSTITIAL to show ads because this will maximize revenue.
vc is the active topmost view controller. Make sure it will not be removed from the screen when the user watch the ad.

hasInterstitial:

+(BOOL)hasInterstitial:(NSString*)typeOfInterstitial

Can only be called from the main thread. It is strongly recommended to avoid using this method. Because it makes our analytic logs too complex to be analyzed quickly. If you want to handle failure to display ads by showInterstitial: and showInterstitial:fromViewController: methods, please use onAdFailedToAppear: delegate method. @typeOfInterstitial can be ADTOAPP_IMAGE_INTERSTITIAL, ADTOAPP_VIDEO_INTERSTITIAL, ADTOAPP_INTERSTITIAL or ADTOAPP_REWARDED_INTERSTITIAL.

hideInterstitial

+(BOOL)hideInterstitial

Hides the displayed interstitial ad if it is supported by the current provider. Can only be called from the main thread.

Contact support