GoogleMobileAds Framework Reference Stay organized with collections Save and categorize content based on your preferences.
GADRewardedAd
@interfaceGADRewardedAd:NSObjectThe GADRewardedAd class is used for requesting and presenting a rewarded ad.
Initializes a rewarded ad with the provided ad unit ID. Create ad unit IDs using the AdMobwebsite for each unique ad placement in your app. Unique ad units improve targeting andstatistics.
Example AdMob ad unit ID: @
ca-app-pub-3940256099942544/1712485313
Declaration
Objective-C
-(nonnullinstancetype)initWithAdUnitID:(nonnullNSString*)adUnitID;Requests an rewarded ad and calls the provided completion handler when the request finishes.
Declaration
Objective-C
-(void)loadRequest:(nullableGADRequest*)requestcompletionHandler:(nullableGADRewardedAdLoadCompletionHandler)completionHandler;The ad unit ID.
Declaration
Objective-C
@property(readonly,nonatomic,nonnull)NSString*adUnitID;Indicates whether the rewarded ad is ready to be presented.
Declaration
Objective-C
@property(readonly,getter=isReady,nonatomic)BOOLready;The ad network class name that fetched the current ad. Is nil while the ready property is NO.For both standard and mediated Google AdMob ads, this property is @
GADMAdapterGoogleAdMobAds
.For ads fetched via mediation custom events, this property is the mediated custom event adapter.Declaration
Objective-C
@property(readonly,copy,nonatomic,nullable)NSString*adNetworkClassName;The reward earned by the user for interacting with a rewarded ad. Is nil until the ad hassuccessfully loaded.
Declaration
Objective-C
@property(readonly,nonatomic,nullable)GADAdReward*reward;Options specified for server-to-server user reward verification.
Declaration
Objective-C
@property(readwrite,copy,nonatomic,nullable)GADServerSideVerificationOptions*serverSideVerificationOptions;The loaded ad’s metadata. Is nil if no ad is loaded or the loaded ad doesn’t have metadata. Admetadata may update after loading. Use the rewardedAdMetadataDidChange: delegate method onGADRewardedAdMetadataDelegate to listen for updates.
Declaration
Objective-C
@property(readonly,nonatomic,nullable)NSDictionary<GADAdMetadataKey,id>*adMetadata;Delegate for ad metadata changes.
Declaration
Objective-C
@property(readwrite,nonatomic,nullable)id<GADRewardedAdMetadataDelegate>adMetadataDelegate;Presents the rewarded ad with the provided view controller and rewarded delegate to call back onvarious intermission events. The delegate is strongly retained by the receiver until a terminaldelegate method is called. Terminal methods are -rewardedAd:didFailToPresentWithError: and-rewardedAdDidClose: of GADRewardedAdDelegate.
Declaration
Objective-C
-(void)presentFromRootViewController:(nonnullUIViewController*)viewControllerdelegate:(nonnullid<GADRewardedAdDelegate>)delegate;
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2021-03-03 UTC.