GADRewardBasedVideoAd

@interface GADRewardBasedVideoAd : NSObject

The GADRewardBasedVideoAd class is used for requesting and presenting a reward based video ad. This class isn’t thread safe.

  • Delegate for receiving video notifications.

    Declaration

    Objective-C

    @property (readwrite, nonatomic, nullable) id<GADRewardBasedVideoAdDelegate>
        delegate;
  • Indicates if the receiver is ready to be presented full screen.

    Declaration

    Swift

    var isReady: Bool { get }

    Objective-C

    @property (readonly, getter=isReady, nonatomic) BOOL ready;
  • The ad network class name that fetched the current ad. Returns nil while the latest ad request is in progress or if the latest ad request failed. For both standard and mediated Google AdMob ads, this property returns @GADMAdapterGoogleAdMobAds. For ads fetched via mediation custom events, this property returns the mediated custom event adapter.

    Declaration

    Swift

    var adNetworkClassName: String? { get }

    Objective-C

    @property (readonly, copy, nonatomic, nullable) NSString *adNetworkClassName;
  • Returns the shared GADRewardBasedVideoAd instance.

    Declaration

    Swift

    class func sharedInstance() -> GADRewardBasedVideoAd

    Objective-C

    + (nonnull GADRewardBasedVideoAd *)sharedInstance;
  • Initiates the request to fetch the reward based video ad. The |request| object supplies ad targeting information and must not be nil. The adUnitID is the ad unit id used for fetching an ad and must not be nil.

    Declaration

    Swift

    func load(_ request: GADRequest, withAdUnitID adUnitID: String)

    Objective-C

    - (void)loadRequest:(nonnull GADRequest *)request
           withAdUnitID:(nonnull NSString *)adUnitID;
  • Presents the reward based video ad with the provided view controller.

    Declaration

    Swift

    func present(fromRootViewController viewController: Any!)

    Objective-C

    - (void)presentFromRootViewController:(id)viewController;