AI-generated Key Takeaways
- 
          GADInterstitialAdis a full-screen ad shown at natural transition points in your application.
- 
          Interstitial ads can be loaded using either an ad unit ID or a server-to-server ad response string. 
- 
          You can check if an interstitial ad can be presented from a given root view controller using canPresentFromRootViewController:error:.
- 
          Interstitial ads are presented using presentFromRootViewController:.
- 
          The fullScreenContentDelegateis used for handling full screen content messages related to the ad.
GADInterstitialAd
@interface GADInterstitialAd : NSObject <GADFullScreenPresentingAd>An interstitial ad. This is a full-screen advertisement shown at natural transition points in your application such as between game levels or news stories. See https://developers.google.com/admob/ios/interstitial to get started.
- 
                  
                  The ad unit ID. DeclarationSwift var adUnitID: String { get }Objective-C @property (nonatomic, readonly, nonnull) NSString *adUnitID;
- 
                  
                  Information about the ad response that returned the ad. DeclarationSwift var responseInfo: ResponseInfo { get }Objective-C @property (nonatomic, readonly, nonnull) GADResponseInfo *responseInfo;
- 
                  
                  Delegate for handling full screen content messages. DeclarationSwift weak var fullScreenContentDelegate: (any FullScreenContentDelegate)? { get set }Objective-C @property (nonatomic, weak, nullable) id<GADFullScreenContentDelegate> fullScreenContentDelegate;
- 
                  
                  Called when the ad is estimated to have earned money. Available for allowlisted accounts only. DeclarationSwift var paidEventHandler: GADPaidEventHandler? { get set }Objective-C @property (nonatomic, copy, nullable) GADPaidEventHandler paidEventHandler;
- 
                  
                  An identifier for a placement in reporting. This property must be set prior to presenting the ad. DeclarationSwift var placementID: Int64 { get set }Objective-C @property (nonatomic) int64_t placementID;
- 
                  
                  Loads an interstitial ad. DeclarationSwift class func load(with adUnitID: String, request: Request?) async throws -> InterstitialAdObjective-C + (void)loadWithAdUnitID:(nonnull NSString *)adUnitID request:(nullable GADRequest *)request completionHandler: (nonnull GADInterstitialAdLoadCompletionHandler)completionHandler;ParametersadUnitIDAn ad unit ID created in the AdMob or Ad Manager UI. requestAn ad request object. If nil, a default ad request object is used. completionHandlerA handler to execute when the load operation finishes or times out. 
- 
                  
                  Loads an interstitial ad. DeclarationSwift class func load(with adResponseString: String) async throws -> InterstitialAdObjective-C + (void)loadWithAdResponseString:(nonnull NSString *)adResponseString completionHandler: (nonnull GADInterstitialAdLoadCompletionHandler) completionHandler;ParametersadResponseStringA server-to-server ad response string. completionHandlerA 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. DeclarationSwift @MainActor func canPresent(from rootViewController: UIViewController?) throwsObjective-C - (BOOL)canPresentFromRootViewController: (nullable UIViewController *)rootViewController error:(NSError *_Nullable *_Nullable)error;Return ValueYESif the interstitial ad can be presented from the provided root view controller,NOotherwise.
- 
                  
                  Presents the interstitial ad. Must be called on the main thread. DeclarationSwift @MainActor func present(from rootViewController: UIViewController?)Objective-C - (void)presentFromRootViewController: (nullable UIViewController *)rootViewController;ParametersrootViewControllerA view controller to present the ad. If nil, attempts to present from the top view controller of the application’s main window.