GoogleMobileAds Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
GADCustomEventInterstitial
Deprecated
Use GADMediationInterstitialAd and GADMediationAdapter instead.
@protocol GADCustomEventInterstitial <NSObject>
The interstitial custom event protocol. Your interstitial custom event handler must implement
this protocol.
-
Deprecated
Use GADMediationInterstitialAd and GADMediationAdapter instead.
Inform |delegate| with the custom event execution results to ensure mediation behaves correctly.
In your class, define the -delegate and -setDelegate: methods or use “@synthesize delegate”. The
Google Mobile Ads SDK sets this property on instances of your class.
-
Deprecated
Use GADMediationInterstitialAd and GADMediationAdapter instead.
Returns an initialized custom event interstitial.
Declaration
Objective-C
- (nonnull instancetype)init;
-
Deprecated
Use GADMediationInterstitialAd and GADMediationAdapter instead.
Called by mediation when your custom event is scheduled to be executed. Your implementation
should start retrieving the interstitial ad. Report execution results to the delegate. You must
wait until -presentFromRootViewController is called before displaying the interstitial ad.
Declaration
Swift
func requestAd(withParameter serverParameter: String?, label serverLabel: String?, request: CustomEventRequest)
Objective-C
- (void)requestInterstitialAdWithParameter:(nullable NSString *)serverParameter
label:(nullable NSString *)serverLabel
request:
(nonnull GADCustomEventRequest *)request;
Parameters
serverParameter
|
Parameter configured in the mediation UI.
|
serverLabel
|
Label configured in the mediation UI.
|
request
|
Contains ad request information.
|
-
Deprecated
Use GADMediationInterstitialAd and GADMediationAdapter instead.
Present the interstitial ad as a modal view using the provided view controller. Called only
after your class calls -customEventInterstitialDidReceiveAd: on its custom event delegate.
Declaration
Swift
func present(fromRootViewController rootViewController: UIViewController)
Objective-C
- (void)presentFromRootViewController:
(nonnull UIViewController *)rootViewController;
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-20 UTC.
[[["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-08-20 UTC."],[[["\u003cp\u003e\u003ccode\u003eGADCustomEventInterstitial\u003c/code\u003e is deprecated and should no longer be used.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers should now utilize \u003ccode\u003eGADMediationInterstitialAd\u003c/code\u003e and \u003ccode\u003eGADMediationAdapter\u003c/code\u003e for interstitial ad implementations.\u003c/p\u003e\n"],["\u003cp\u003eThis protocol was previously used to define custom event handlers for interstitial ads, requiring implementation of specific methods for ad requests and presentation.\u003c/p\u003e\n"],["\u003cp\u003eDespite its deprecation, the documentation details the protocol's previous functionality, including methods like \u003ccode\u003erequestInterstitialAdWithParameter\u003c/code\u003e and \u003ccode\u003epresentFromRootViewController\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers migrating from \u003ccode\u003eGADCustomEventInterstitial\u003c/code\u003e should refer to the documentation of \u003ccode\u003eGADMediationInterstitialAd\u003c/code\u003e and \u003ccode\u003eGADMediationAdapter\u003c/code\u003e for guidance on the new implementation.\u003c/p\u003e\n"]]],["The `GADCustomEventInterstitial` protocol is deprecated and should be replaced with `GADMediationInterstitialAd` and `GADMediationAdapter`. This protocol requires implementing classes to have a delegate to report execution results. It includes an initializer and methods to: request an interstitial ad using parameters, a label, and request information; and present the loaded ad modally from a provided view controller. Developers must report ad results to the delegate, and wait for the `presentFromRootViewController` method call before displaying the ad.\n"],null,["GADCustomEventInterstitial \nDeprecated\n\nUse GADMediationInterstitialAd and GADMediationAdapter instead. \n\n @protocol GADCustomEventInterstitial \u003cNSObject\u003e\n\nThe interstitial custom event protocol. Your interstitial custom event handler must implement\nthis protocol.\n- `\n ``\n ``\n `\n\n [delegate](#/c:objc(pl)GADCustomEventInterstitial(py)delegate)`\n ` \n Deprecated\n\n Use GADMediationInterstitialAd and GADMediationAdapter instead. \n Inform \\|delegate\\| with the custom event execution results to ensure mediation behaves correctly.\n\n In your class, define the -delegate and -setDelegate: methods or use \"@synthesize delegate\". The\n Google Mobile Ads SDK sets this property on instances of your class. \n\n Declaration \n Swift \n\n weak var delegate: (any ../Protocols/GADCustomEventInterstitialDelegate.html)? { get set }\n\n Objective-C \n\n @property (nonatomic, weak, nullable) id\u003c../Protocols/GADCustomEventInterstitialDelegate.html\u003e delegate;\n\n- `\n ``\n ``\n `\n\n [-init](#/c:objc(pl)GADCustomEventInterstitial(im)init)`\n ` \n Deprecated\n\n Use GADMediationInterstitialAd and GADMediationAdapter instead. \n Returns an initialized custom event interstitial. \n\n Declaration \n Swift \n\n init()\n\n Objective-C \n\n - (nonnull instancetype)init;\n\n- `\n ``\n ``\n `\n\n [-requestInterstitialAdWithParameter:label:request:](#/c:objc(pl)GADCustomEventInterstitial(im)requestInterstitialAdWithParameter:label:request:)`\n ` \n Deprecated\n\n Use GADMediationInterstitialAd and GADMediationAdapter instead. \n Called by mediation when your custom event is scheduled to be executed. Your implementation\n should start retrieving the interstitial ad. Report execution results to the delegate. You must\n wait until -presentFromRootViewController is called before displaying the interstitial ad. \n\n Declaration \n Swift \n\n func requestAd(withParameter serverParameter: String?, label serverLabel: String?, request: CustomEventRequest)\n\n Objective-C \n\n - (void)requestInterstitialAdWithParameter:(nullable NSString *)serverParameter\n label:(nullable NSString *)serverLabel\n request:\n (nonnull ../Classes/GADCustomEventRequest.html *)request;\n\n Parameters\n\n |-------------------------|-------------------------------------------|\n | ` `*serverParameter*` ` | Parameter configured in the mediation UI. |\n | ` `*serverLabel*` ` | Label configured in the mediation UI. |\n | ` `*request*` ` | Contains ad request information. |\n\n- `\n ``\n ``\n `\n\n [-presentFromRootViewController:](#/c:objc(pl)GADCustomEventInterstitial(im)presentFromRootViewController:)`\n ` \n Deprecated\n\n Use GADMediationInterstitialAd and GADMediationAdapter instead. \n Present the interstitial ad as a modal view using the provided view controller. Called only\n after your class calls -customEventInterstitialDidReceiveAd: on its custom event delegate. \n\n Declaration \n Swift \n\n func present(fromRootViewController rootViewController: UIViewController)\n\n Objective-C \n\n - (void)presentFromRootViewController:\n (nonnull UIViewController *)rootViewController;"]]