InterstitialAdLoader

@objc(YMAInterstitialAdLoader)
@objcMembers
public final class InterstitialAdLoader : NSObject, @unchecked Sendable

This class is responsible for loading an interstitial ad.

  • Undocumented

    Declaration

    Swift

    override public init()
  • Loads an ad with the specified targeting data.

    Declaration

    Swift

    public func loadAd(
        with request: AdRequest,
        completion: @escaping @MainActor (Result<InterstitialAd, Error>) -> Void
    )

    Parameters

    request

    Data for targeting and ad configuration.

    completion

    The completion handler to be called when the ad loading is finished.

  • loadAd(with:) Asynchronous

    Asynchronously loads an ad with the specified targeting data.

    Declaration

    Swift

    public func loadAd(with request: AdRequest) async throws -> InterstitialAd

    Parameters

    request

    Data for targeting and ad configuration.

  • Cancel the ad loading, that was launched in loadAdWithAdUnitID:request

    Declaration

    Swift

    public func cancelLoading()