Skip to content
:docs

Interstitial

Learn how to add and configure an interstitial placement and implement additional features through the SDK interface.

Key features

Interstitial placements cover the app completely and are easy to integrate. Because they overlay your app, you can show them without considering how they fit with the app UI. Choose either a dialog or bottom sheet UI to suit your design.

Integration

Follow these steps to integrate an interstitial placement.

Step 1. Prepare

  • Complete Getting started.
  • Obtain a Unit ID for the interstitial placement (referred to below as YOUR_INTERSTITIAL_UNIT_ID).

Step 2. Allocate and display ads

Follow these steps to allocate and display ads in an interstitial placement.

  1. Choose an interstitial UI type and create BZVBuzzAdInterstitial.
  • Dialog UI: Set type to dialog.
  • Bottom sheet UI: Set type to bottomSheet.
  1. Call load to allocate an ad.

  2. Call presentOnViewController to display the ad.

Swift
import UIKit
import BuzzvilSDK

final class ViewController: UIViewController, BZVBuzzAdInterstitialDelegate {
  let buzzAdInterstitial = BZVBuzzAdInterstitial { builder in
    builder.unitId = "YOUR_INTERSTITIAL_UNIT_ID"
    builder.type = .dialog
  }

  override func viewDidLoad() {
    super.viewDidLoad()

    buzzAdInterstitial.delegate = self
    buzzAdInterstitial.load()
  }
}
extension ViewController: BZVBuzzAdInterstitialDelegate {
  func bzvBuzzAdInterstitialDidLoadAd(_ interstitial: BZVBuzzAdInterstitial) {
    // 할당된 광고가 있으면 호출됩니다.
    // Interstitial 광고를 화면에 표시합니다.
    interstitial.present(on: self)
  }
  
  func bzvBuzzAdInterstitialDidFail(toLoadAd interstitial: BZVBuzzAdInterstitial, withError error: Error) {
    // 할당된 광고가 없으면 호출됩니다.
  }
  
  func bzvBuzzAdInterstitialDidDismiss(_ viewController: UIViewController) {
    // Interstitial 지면이 종료되면 호출됩니다.
    // 필요에 따라 추가 기능을 구현하세요.
  }
}

Step 3. Add a BenefitHub entry point to the interstitial

Add an entry point that takes users from Interstitial to BenefitHub.

Interstitial displays an entry point to BenefitHub. Tapping it opens BenefitHub using the BZVFeedConfig object configured through setDefaultFeedConfig(). To use a different BZVFeedConfig, follow these steps. The entry point layout cannot be changed.

  1. Create a new BZVFeedConfig.
  2. Create a BuzzBenefitRouter instance using the BZVFeedConfig from step 1.
  3. Add the BuzzBenefitRouter instance to buzzAdBenefitRouter of BuzzAdInterstitial.Builder to change BZVFeedConfig.
Swift
let feedConfig = BZVFeedConfig { builder in
  builder.unitID = "YOUR_FEED_UNIT_ID"
}

let buzzAdInterstitial = BZVBuzzAdInterstitial { builder in
  builder.unitId = "YOUR_INTERSTITIAL_UNIT_ID"
  builder.type = .dialog
  builder.buzzAdBenefitRouter = BuzzBenefitRouterFactory.createFeedRouter(feedConfig)
}

Additional features

Set the number of ads

A bottom sheet interstitial can display up to five ads from a single ad request.

The number of ads can be configured on Buzzvil's server without code changes. To display multiple ads, send your preferred number to your Buzzvil representative at help@buzzvil.com.