Interstitial Type (iOS)

BuzzAd Benefit SDK: Interstitial Ads


This documentation provides a guideline for integrating interstitial ads for BuzzAd Benefit.

※ Note

  1. Please proceed with the following process only after BuzzAd Benefit SDK integration is complete.

  2. The interstitial type is available for the convenience of app publishers. For more customization options, please implement the native type.

 

Index

 

Basic Usage


Setting the BABInterstitialAdHandler

  1. Create the BABInterstitialAdHandler with unit_id and type (Dialog or Bottomsheet, see below for details).

  2. Request for ads by calling show:withConfig.

 

// Objective-C BABInterstitialAdHandler *interstitialAdHandler = [[BABInterstitialAdHandler alloc] initWithUnitId:YOUR_INTERSTITIAL_AD_UNIT_ID type:BABInterstitialDialog]; [interstitialAdHandler show:self withConfig:nil];

 

// Swift let interstitialAdHandler = BABInterstitialAdHandler(unitId: YOUR_INTERSTITIAL_AD_UNIT_ID, type: BABInterstitialDialog) interstitialAdHandler.show(self, with: nil)

Setting the Interstitial Type

Please set the desired type of interstitial ad either by Dialog or BottomSheet:

  • BABInterstitialDialog

  • BABInterstitialBottomSheet

 

Advanced Usage


Setting the BABInterstitialConfig

The design and the number of advertisement are configurable with the BABInterstitialConfig. This should be included when calling show:withConfig.

Common Config

  • topIcon : Icon at the top of the Interstitial ad (UIImage)

  • titleText : Text at the top of the Interstitial ad (NSString)

  • titleTextColor : Color of titleText (UIColor)

  • backgroundColor : Background color of the interstitial ad (UIColor)

  • ctaViewBackgroundColor : Background color of CTA view (BABStateValue<UIColor *>)

  • ctaViewIcon : Default icon included in CTA view (BABStateValue<UIImage *>)

  • ctaViewTextColor : Color of the text in CTA view (BABStateValue<UIColor *>)

Dialog Specific Config

  • closeText : Text for close button

Bottom Sheet Specific Config

  • adCount : 1 ~ 5 ads can be requested at one time. adCount is fixed to 5 if is not set or set beyond 5.

 

// Objective-C BABInterstitialConfig *config = [[BABInterstitialConfig alloc] init]; [config setTopIcon:[UIImage imageNamed:@"top_icon"]]; [config setTitleText:@"View now and earn points"]; [config setTitleTextColor:UIColor.blackColor]; [config setBackgroundColor:UIColor.whiteColor]; [config setCtaViewIcon:[[BABStateValue<UIImage *> alloc] initWithEnabled:[UIImage imageNamed:@"cta_enabled_icon"] disabled:[UIImage imageNamed:@"cta_disabled_icon"]]]; [config setCtaViewTextColor:[[BABStateValue<UIColor *> alloc] initWithEnabled:RGB(255, 255, 255) disabled:RGB(177, 177, 177)]]; [config setCtaViewBackgroundColor:[[BABStateValue<UIColor *> alloc] initWithEnabled:RGB(240, 89, 82) disabled:RGB(253, 133, 135)]]; [interstitialAdHandler show:self withConfig:config];



 

Handling the ad loading events via delegation

Implement the BABInterstitialAdHandlerDelegate to receive ad load success/failure events.