RewardedAdLoader

@objc(YMARewardedAdLoader)
@objcMembers
public final class RewardedAdLoader : NSObject, @unchecked Sendable

This class is responsible for loading a rewarded 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<RewardedAd, 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 -> RewardedAd

    Parameters

    request

    Data for targeting and ad configuration.

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

    Declaration

    Swift

    public func cancelLoading()