GoogleMobileAds Framework Reference

GADRewardedInterstitialAd

@interface GADRewardedInterstitialAd
    : NSObject <GADAdMetadataProvider, GADFullScreenPresentingAd>

A rewarded interstitial ad. Rewarded Interstitial ads are full screen ads that can be presented without user-opt in and allow you to reward the user with in-app items.

  • The ad unit ID.

    Declaration

    Swift

    var adUnitID: String { get }

    Objective-C

    @property (readonly, nonatomic, nonnull) NSString *adUnitID;
  • Information about the ad response that returned the ad.

    Declaration

    Swift

    var responseInfo: GADResponseInfo { get }

    Objective-C

    @property (readonly, nonatomic, nonnull) GADResponseInfo *responseInfo;
  • The reward earned by the user for interacting with the ad.

    Declaration

    Swift

    var adReward: GADAdReward { get }

    Objective-C

    @property (readonly, nonatomic, nonnull) GADAdReward *adReward;
  • Options specified for server-side user reward verification. Must be set before presenting this ad.

    Declaration

    Swift

    @NSCopying var serverSideVerificationOptions: GADServerSideVerificationOptions? { get set }

    Objective-C

    @property (copy, nonatomic, nullable) GADServerSideVerificationOptions *serverSideVerificationOptions;
  • Delegate for handling full screen content messages.

    Declaration

    Swift

    weak var fullScreenContentDelegate: GADFullScreenContentDelegate? { get set }

    Objective-C

    @property (nonatomic, nullable) id<GADFullScreenContentDelegate> fullScreenContentDelegate;
  • Called when the ad is estimated to have earned money. Available for allowlisted accounts only.

    Declaration

    Swift

    var paidEventHandler: GADPaidEventHandler? { get set }

    Objective-C

    @property (copy, nonatomic, nullable) GADPaidEventHandler paidEventHandler;
  • Loads a rewarded interstitial ad.

    Declaration

    Swift

    class func load(withAdUnitID adUnitID: String, request: GADRequest?, completionHandler: @escaping GADRewardedInterstitialAdLoadCompletionHandler)

    Objective-C

    + (void)loadWithAdUnitID:(nonnull NSString *)adUnitID
                     request:(nullable GADRequest *)request
           completionHandler:
               (nonnull GADRewardedInterstitialAdLoadCompletionHandler)
                   completionHandler;

    Parameters

    adUnitID

    An ad unit ID created in the AdMob or Ad Manager UI.

    request

    An ad request object. If nil, a default ad request object is used.

    completionHandler

    A handler to execute when the load operation finishes or times out.

  • Returns whether the rewarded interstitial ad can be presented from the provided root view controller. Sets the error out parameter if the ad can’t be presented. Must be called on the main thread.

    Declaration

    Swift

    func canPresent(fromRootViewController rootViewController: UIViewController) throws

    Objective-C

    - (BOOL)canPresentFromRootViewController:
                (nonnull UIViewController *)rootViewController
                                       error:(NSError *_Nullable *_Nullable)error;
  • Presents the rewarded interstitial ad. Must be called on the main thread.

    Declaration

    Swift

    func present(fromRootViewController viewController: UIViewController, userDidEarnRewardHandler: @escaping GADUserDidEarnRewardHandler)

    Objective-C

    - (void)presentFromRootViewController:(nonnull UIViewController *)viewController
                 userDidEarnRewardHandler:
                     (nonnull GADUserDidEarnRewardHandler)userDidEarnRewardHandler;

    Parameters

    viewController

    A view controller to present the ad.

    userDidEarnRewardHandler

    A handler to execute when the user earns a reward. adReward contains the reward information.