Rewarded interstitialis a type
of incentivized ad format that allows you offer rewards for ads that appear
automatically during natural app transitions. Unlike rewarded ads, users aren't
required to opt-in to view a rewarded interstitial.
The primary steps to integrate rewarded interstitial ads are as follows:
Load an ad
[Optional] Validate SSV callbacks
Register for callbacks
Display the ad and handle the reward event
Load an ad
Loading an ad is accomplished using theload(adUnitID:request)method on theGADRewardedInterstitialAdclass.
Swift
funcloadRewardedInterstitialAd()async{do{rewardedInterstitialAd=tryawaitRewardedInterstitialAd.load(// Replace this ad unit ID with your own ad unit ID.with:"adUnitID",request:Request())rewardedInterstitialAd?.fullScreenContentDelegate=self}catch{print("Rewarded ad failed to load with error:\(error.localizedDescription)")}}
importGoogleMobileAdsclassRewardedInterstitialViewModel:NSObject,ObservableObject,FullScreenContentDelegate{@Publishedvarcoins=0privatevarrewardedInterstitialAd:RewardedInterstitialAd?funcloadAd()async{do{rewardedInterstitialAd=tryawaitRewardedInterstitialAd.load(with:"ca-app-pub-3940256099942544/6978759866",request:Request())rewardedInterstitialAd?.fullScreenContentDelegate=self}catch{print("Failed to load rewarded interstitial ad with error:\(error.localizedDescription)")}}
-(void)loadRewardedInterstitialAd{[GADRewardedInterstitialAdloadWithAdUnitID:"adUnitID"request:[GADRequestrequest]completionHandler:^(GADRewardedInterstitialAd*ad,NSError*error){if(error){NSLog(@"Failed to load rewarded interstitial ad with error: %@",error.localizedDescription);return;}self.rewardedInterstitialAd=ad;self.rewardedInterstitialAd.fullScreenContentDelegate=self;}];}
Apps that require extra data inserver-side
verificationcallbacks should use the
custom data feature of rewarded ads. Any string value set on a rewarded ad
object is passed to thecustom_dataquery parameter of the SSV callback. If no
custom data value is set, thecustom_dataquery parameter value won't be
present in the SSV callback.
The following code sample demonstrates how to set custom data on a rewarded
interstitial ad object before requesting an ad.
Swift
privatefuncvalidateServerSideVerification()async{do{rewardedInterstitialAd=tryawaitRewardedInterstitialAd.load(// Replace this ad unit ID with your own ad unit ID.with:"adUnitID",request:Request())letoptions=ServerSideVerificationOptions()options.customRewardText=""SAMPLE_CUSTOM_DATA_STRING""rewardedInterstitialAd?.serverSideVerificationOptions=options}catch{print("Rewarded ad failed to load with error:\(error.localizedDescription)")}}
-(void)validateServerSideVerification{// Replace this ad unit ID with your own ad unit ID.[GADRewardedInterstitialAdloadWithAdUnitID:"adUnitID"request:[GADRequestrequest]completionHandler:^(GADRewardedInterstitialAd*ad,NSError*error){if(error){NSLog(@"Rewarded interstitial ad failed to load with error: %@",error.localizedDescription);return;}self.rewardedInterstitialAd=ad;GADServerSideVerificationOptions*options=[[GADServerSideVerificationOptionsalloc]init];options.customRewardString=@""SAMPLE_CUSTOM_DATA_STRING"";ad.serverSideVerificationOptions=options;}];}
ReplaceSAMPLE_CUSTOM_DATA_STRINGwith your custom data.
Register for callbacks
To receive notifications for presentation events, you must assign theGADFullScreenContentDelegateto thefullScreenContentDelegateproperty of
the returned ad:
TheGADFullScreenContentDelegateprotocol handles callbacks for when the ad
presents successfully or unsuccessfully, and when it is dismissed. The following
code shows how to implement the protocol and assign it to the ad:
Swift
funcadDidRecordImpression(_ad:FullScreenPresentingAd){print("\(#function)called.")}funcadDidRecordClick(_ad:FullScreenPresentingAd){print("\(#function)called.")}funcadWillPresentFullScreenContent(_ad:FullScreenPresentingAd){print("\(#function)called.")}funcadWillDismissFullScreenContent(_ad:FullScreenPresentingAd){print("\(#function)called.")}funcadDidDismissFullScreenContent(_ad:FullScreenPresentingAd){print("\(#function)called.")// Clear the rewarded interstitial ad.rewardedInterstitialAd=nil}funcad(_ad:FullScreenPresentingAd,didFailToPresentFullScreenContentWithErrorerror:Error){print("\(#function)called with error:\(error.localizedDescription).")}
-(void)adDidRecordImpression:(id<GADFullScreenPresentingAd>)ad{NSLog(@"%s called",__PRETTY_FUNCTION__);}-(void)adDidRecordClick:(id<GADFullScreenPresentingAd>)ad{NSLog(@"%s called",__PRETTY_FUNCTION__);}-(void)adWillPresentFullScreenContent:(id<GADFullScreenPresentingAd>)ad{NSLog(@"%s called",__PRETTY_FUNCTION__);}-(void)adWillDismissFullScreenContent:(id<GADFullScreenPresentingAd>)ad{NSLog(@"%s called",__PRETTY_FUNCTION__);}-(void)adDidDismissFullScreenContent:(id<GADFullScreenPresentingAd>)ad{NSLog(@"%s called",__PRETTY_FUNCTION__);// Clear the rewarded interstitial ad.self.rewardedInterstitialAd=nil;}-(void)ad:(id)addidFailToPresentFullScreenContentWithError:(NSError*)error{NSLog(@"%s called with error: %@",__PRETTY_FUNCTION__,error.localizedDescription);}
When presenting your ad, you must provide aGADUserDidEarnRewardHandlerobject
to handle the reward for the user.
The following code presents the best method for displaying a rewarded
interstitial ad.
Swift
funcshowRewardedInterstitialAd(){guardletrewardedInterstitialAd=rewardedInterstitialAdelse{returnprint("Ad wasn't ready.")}// The UIViewController parameter is an optional.rewardedInterstitialAd.present(from:nil){letreward=rewardedInterstitialAd.adRewardprint("Reward received with currency\(reward.amount), amount\(reward.amount.doubleValue)")// TODO: Reward the user.}}
-(void)showRewardedInterstitialAd{[self.rewardedInterstitialAdpresentFromRootViewController:selfuserDidEarnRewardHandler:^{GADAdReward*reward=self.rewardedInterstitialAd.adReward;NSString*rewardMessage=[NSStringstringWithFormat:@"Reward received with "@"currency %@ , amount %ld",reward.type,[reward.amountlongValue]];NSLog(@"%@",rewardMessage);// TODO: Reward the user.}];}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003eRewarded interstitial ads are an incentivized format that automatically displays during natural app transitions, without requiring user opt-in.\u003c/p\u003e\n"],["\u003cp\u003eTo implement rewarded interstitials, you need to load an ad, optionally validate SSV callbacks, register for callbacks, and finally display the ad while handling the reward event.\u003c/p\u003e\n"],["\u003cp\u003eBefore displaying a rewarded interstitial, you must present an intro screen with clear reward messaging and a skip option, adhering to user privacy guidelines.\u003c/p\u003e\n"],["\u003cp\u003eYou can preload rewarded interstitial ads to minimize latency and ensure seamless delivery when needed, but remember to refresh the cache hourly due to ad expiration.\u003c/p\u003e\n"],["\u003cp\u003eFull implementation examples for rewarded interstitials are available in Swift, SwiftUI, and Objective-C on GitHub.\u003c/p\u003e\n"]]],["Rewarded interstitial ads are loaded using the `load(adUnitID:request)` method. Optionally, server-side verification (SSV) callbacks can be validated by setting custom data. To receive notifications, register for callbacks by implementing the `GADFullScreenContentDelegate` protocol. Ads are displayed using `present(fromRootViewController:)`, and rewards are handled via `GADUserDidEarnRewardHandler`. Ensure a pre-ad intro screen with reward details and a skip option is presented. Preload ads to reduce latency, refreshing the cache hourly.\n"],null,[]]