GoogleMobileAds Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
-
Declaration
Swift
var adUnitID: String { get }
Objective-C
@property (nonatomic, readonly, nonnull) NSString *adUnitID;
-
Information about the ad response that returned the ad.
Declaration
Swift
var responseInfo: ResponseInfo { get }
Objective-C
@property (nonatomic, readonly, nonnull) GADResponseInfo *responseInfo;
-
Delegate for handling full screen content messages.
Declaration
Swift
weak var fullScreenContentDelegate: (any FullScreenContentDelegate)? { get set }
-
Called when the ad is estimated to have earned money. Available for allowlisted accounts only.
-
An identifier for a placement in reporting. This property must be set prior to presenting the
ad.
Declaration
Swift
var placementID: Int64 { get set }
Objective-C
@property (nonatomic) int64_t placementID;
-
Loads an interstitial ad.
Declaration
Swift
class func load(with adUnitID: String, request: Request?) async throws -> InterstitialAd
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.
|
-
Loads an interstitial ad.
Declaration
Swift
class func load(with adResponseString: String) async throws -> InterstitialAd
Parameters
adResponseString
|
A server-to-server ad response string.
|
completionHandler
|
A handler to execute when the load operation finishes or times out.
|
-
Indicates whether the interstitial ad can be presented from the provided root view controller.
Must be called on the main thread.
Declaration
Swift
@MainActor func canPresent(from rootViewController: UIViewController?) throws
Objective-C
- (BOOL)canPresentFromRootViewController:
(nullable UIViewController *)rootViewController
error:(NSError *_Nullable *_Nullable)error;
Return Value
YES
if the interstitial ad can be presented from the provided root view controller,
NO
otherwise.
-
Presents the interstitial ad. Must be called on the main thread.
Declaration
Swift
@MainActor func present(from rootViewController: UIViewController?)
Objective-C
- (void)presentFromRootViewController:
(nullable UIViewController *)rootViewController;
Parameters
rootViewController
|
A view controller to present the ad. If nil, attempts to present from
the top view controller of the application’s main window.
|
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.
[null,null,["Last updated 2025-08-20 UTC."],[[["\u003cp\u003e\u003ccode\u003eGADInterstitialAd\u003c/code\u003e displays full-screen advertisements at natural transition points within your application.\u003c/p\u003e\n"],["\u003cp\u003eYou can load an interstitial ad using an ad unit ID or a server-to-server ad response string.\u003c/p\u003e\n"],["\u003cp\u003eBefore presenting, ensure the interstitial ad can be presented from the intended root view controller using \u003ccode\u003ecanPresent(fromRootViewController:)\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eGADInterstitialAd\u003c/code\u003e provides delegates to handle events like ad loading, presentation, and user interactions.\u003c/p\u003e\n"],["\u003cp\u003eUse the \u003ccode\u003epresent(fromRootViewController:)\u003c/code\u003e method to display the interstitial ad to the user.\u003c/p\u003e\n"]]],["GADInterstitialAd is a full-screen ad shown at app transition points. Key actions include: loading an ad using an `adUnitID` and `request` or an `adResponseString`, with a completion handler to signal the operation's outcome. It can check if it's able to be presented from a root view controller, then it can be presented from a root view controller. The `adUnitID`, `responseInfo`, `fullScreenContentDelegate`, and `paidEventHandler` properties are available.\n"],null,["# GoogleMobileAds Framework Reference\n\nGADInterstitialAd\n=================\n\n\n @interface GADInterstitialAd : NSObject \u003c../Protocols/GADFullScreenPresentingAd.html\u003e\n\nAn interstitial ad. This is a full-screen advertisement shown at natural transition points in\nyour application such as between game levels or news stories. See\n\u003chttps://developers.google.com/admob/ios/interstitial\u003e to get started.\n- `\n ``\n ``\n `\n\n ### [adUnitID](#/c:objc(cs)GADInterstitialAd(py)adUnitID)\n\n `\n ` \n The ad unit ID. \n\n #### Declaration\n\n Swift \n\n var adUnitID: String { get }\n\n Objective-C \n\n @property (nonatomic, readonly, nonnull) NSString *adUnitID;\n\n- `\n ``\n ``\n `\n\n ### [responseInfo](#/c:objc(cs)GADInterstitialAd(py)responseInfo)\n\n `\n ` \n Information about the ad response that returned the ad. \n\n #### Declaration\n\n Swift \n\n var responseInfo: ResponseInfo { get }\n\n Objective-C \n\n @property (nonatomic, readonly, nonnull) ../Classes/GADResponseInfo.html *responseInfo;\n\n- `\n ``\n ``\n `\n\n ### [fullScreenContentDelegate](#/c:objc(cs)GADInterstitialAd(py)fullScreenContentDelegate)\n\n `\n ` \n Delegate for handling full screen content messages. \n\n #### Declaration\n\n Swift \n\n weak var fullScreenContentDelegate: (any FullScreenContentDelegate)? { get set }\n\n Objective-C \n\n @property (nonatomic, weak, nullable) id\u003c../Protocols/GADFullScreenContentDelegate.html\u003e fullScreenContentDelegate;\n\n- `\n ``\n ``\n `\n\n ### [paidEventHandler](#/c:objc(cs)GADInterstitialAd(py)paidEventHandler)\n\n `\n ` \n Called when the ad is estimated to have earned money. Available for allowlisted accounts only. \n\n #### Declaration\n\n Swift \n\n var paidEventHandler: ../Type-Definitions.html#/c:GADAdValue.h@T@GADPaidEventHandler? { get set }\n\n Objective-C \n\n @property (nonatomic, copy, nullable) ../Type-Definitions.html#/c:GADAdValue.h@T@GADPaidEventHandler paidEventHandler;\n\n- `\n ``\n ``\n `\n\n ### [placementID](#/c:objc(cs)GADInterstitialAd(py)placementID)\n\n `\n ` \n An identifier for a placement in reporting. This property must be set prior to presenting the\n ad. \n\n #### Declaration\n\n Swift \n\n var placementID: Int64 { get set }\n\n Objective-C \n\n @property (nonatomic) int64_t placementID;\n\n- `\n ``\n ``\n `\n\n ### [+loadWithAdUnitID:request:completionHandler:](#/c:objc(cs)GADInterstitialAd(cm)loadWithAdUnitID:request:completionHandler:)\n\n `\n ` \n Loads an interstitial ad. \n\n #### Declaration\n\n Swift \n\n class func load(with adUnitID: String, request: Request?) async throws -\u003e InterstitialAd\n\n Objective-C \n\n + (void)loadWithAdUnitID:(nonnull NSString *)adUnitID\n request:(nullable ../Classes/GADRequest.html *)request\n completionHandler:\n (nonnull ../Type-Definitions.html#/c:GADInterstitialAd.h@T@GADInterstitialAdLoadCompletionHandler)completionHandler;\n\n #### Parameters\n\n |---------------------------|---------------------------------------------------------------------|\n | ` `*adUnitID*` ` | An ad unit ID created in the AdMob or Ad Manager UI. |\n | ` `*request*` ` | An ad request object. If nil, a default ad request object is used. |\n | ` `*completionHandler*` ` | A handler to execute when the load operation finishes or times out. |\n\n- `\n ``\n ``\n `\n\n ### [+loadWithAdResponseString:completionHandler:](#/c:objc(cs)GADInterstitialAd(cm)loadWithAdResponseString:completionHandler:)\n\n `\n ` \n Loads an interstitial ad. \n\n #### Declaration\n\n Swift \n\n class func load(with adResponseString: String) async throws -\u003e InterstitialAd\n\n Objective-C \n\n + (void)loadWithAdResponseString:(nonnull NSString *)adResponseString\n completionHandler:\n (nonnull ../Type-Definitions.html#/c:GADInterstitialAd.h@T@GADInterstitialAdLoadCompletionHandler)\n completionHandler;\n\n #### Parameters\n\n |---------------------------|---------------------------------------------------------------------|\n | ` `*adResponseString*` ` | A server-to-server ad response string. |\n | ` `*completionHandler*` ` | A handler to execute when the load operation finishes or times out. |\n\n- `\n ``\n ``\n `\n\n ### [-canPresentFromRootViewController:error:](#/c:objc(cs)GADInterstitialAd(im)canPresentFromRootViewController:error:)\n\n `\n ` \n Indicates whether the interstitial ad can be presented from the provided root view controller.\n Must be called on the main thread. \n\n #### Declaration\n\n Swift \n\n @MainActor func canPresent(from rootViewController: UIViewController?) throws\n\n Objective-C \n\n - (BOOL)canPresentFromRootViewController:\n (nullable UIViewController *)rootViewController\n error:(NSError *_Nullable *_Nullable)error;\n\n #### Return Value\n\n `YES` if the interstitial ad can be presented from the provided root view controller,\n `NO` otherwise.\n- `\n ``\n ``\n `\n\n ### [-presentFromRootViewController:](#/c:objc(cs)GADInterstitialAd(im)presentFromRootViewController:)\n\n `\n ` \n Presents the interstitial ad. Must be called on the main thread. \n\n #### Declaration\n\n Swift \n\n @MainActor func present(from rootViewController: UIViewController?)\n\n Objective-C \n\n - (void)presentFromRootViewController:\n (nullable UIViewController *)rootViewController;\n\n #### Parameters\n\n |----------------------------|---------------------------------------------------------------------------------------------------------------------------------|\n | ` `*rootViewController*` ` | A view controller to present the ad. If nil, attempts to present from the top view controller of the application's main window. |"]]