Interstitial

public class Interstitial

This class represents an Interstitial Ad format.

You call the static method create(placementId:test:verbose:) to create a new interstitial instance.

  • The placement Id for this interstitial.

    Declaration

    Swift

    public let placementId: String
  • The object that acts as the delegate of the interstitial.

    The delegate must adopt the InterstitialDelegate protocol. The delegate is not retained.

    Declaration

    Swift

    public weak var delegate: InterstitialDelegate?
  • Indicates if the interstitial is ready to be presented.

    Declaration

    Swift

    public var isReady: Bool { get }
  • Starts a new load call.

    Declaration

    Swift

    public func load(customProperties: CustomProperties = CustomProperties())

    Parameters

    customProperties

    An optional CustomProperties object containing custom properties, useful for tracking.

  • Presents a previously loaded interstitial.

    Declaration

    Swift

    public func present(fromViewController viewController: UIViewController)

    Parameters

    viewController

    A view controller to present the ad.

  • Presents a previously loaded interstitial.

    Declaration

    Swift

    public func present(fromViewController viewController: UIViewController, fromAdSpace adSpace: String)

    Parameters

    viewController

    A view controller to present the ad.

    adSpace

    The space in your app from where the ad will be shown (eg: dashboard, settings). Used for tracking.

  • Creates a new instance of an Interstitial.

    Declaration

    Swift

    public static func create(placementId: String, test: Bool = false, verbose: Bool = false) -> Interstitial

    Parameters

    placementId

    A string containing a valid placement id.

    test

    Whether a test interstitial should be loaded. This is only for testing purposes, should be false on production builds.

    verbose

    Enable logging for this interstitial instance. This is only for debugging purposes, should be false on production builds.

    Return Value

    An Interstitial instance ready to load.