GoogleMobileAds Framework Reference

  • GADCustomEventInterstitialDelegate is deprecated; use GADMediationInterstitialAdEventDelegate instead.

  • This delegate handles callbacks in your custom event for interstitial ads, including ad reception, failures, clicks, presentation, and dismissal.

  • Custom events must call specific delegate methods like customEventInterstitialDidReceiveAd: upon receiving an ad or customEventInterstitial:didFailAd: if ad retrieval fails.

  • Delegate methods provide signals for ad interactions such as clicks, presentation, and dismissal, enabling the SDK to track and manage the ad lifecycle.

  • Some previously available methods within this delegate, such as customEventInterstitial:didReceiveAd: and customEventInterstitialWillLeaveApplication:, are now deprecated and have either replacements or no alternatives.

GADCustomEventInterstitialDelegate

Deprecated

Use GADMediationInterstitialAdEventDelegate instead.

@protocol GADCustomEventInterstitialDelegate <NSObject>

Call back to this delegate in your custom event. You must call customEventInterstitialDidReceiveAd: when there is an ad to show, or customEventInterstitial:didFailAd: when there is no ad to show. Otherwise, if enough time passed (several seconds) after the SDK called the requestInterstitialAdWithParameter: method of your custom event, the mediation SDK will consider the request timed out, and move on to the next ad network.

  • Deprecated

    Use GADMediationInterstitialAdEventDelegate instead.

    Your Custom Event object must call this when it receives or creates an interstitial ad.

    Declaration

    Swift

    func customEventInterstitialDidReceiveAd(_ customEvent: any GADCustomEventInterstitial)

    Objective-C

    - (void)customEventInterstitialDidReceiveAd:
        (nonnull id<GADCustomEventInterstitial>)customEvent;
  • Deprecated

    Use GADMediationInterstitialAdEventDelegate instead.

    Your Custom Event object must call this when it fails to receive or create the ad. Pass along any error object sent from the ad network’s SDK, or an NSError describing the error. Pass nil if not available.

    Declaration

    Swift

    func customEventInterstitial(_ customEvent: any GADCustomEventInterstitial, didFailAd error: (any Error)?)

    Objective-C

    - (void)customEventInterstitial:
                (nonnull id<GADCustomEventInterstitial>)customEvent
                          didFailAd:(nullable NSError *)error;
  • Deprecated

    Use GADMediationInterstitialAdEventDelegate instead.

    Your Custom Event object should call this when the user touches or “clicks” the ad to initiate an action. When the SDK receives this callback, it reports the click back to the mediation server.

    Declaration

    Swift

    func customEventInterstitialWasClicked(_ customEvent: any GADCustomEventInterstitial)

    Objective-C

    - (void)customEventInterstitialWasClicked:
        (nonnull id<GADCustomEventInterstitial>)customEvent;
  • Deprecated

    Use GADMediationInterstitialAdEventDelegate instead.

    Your Custom Event should call this when the interstitial is being displayed.

    Declaration

    Swift

    func customEventInterstitialWillPresent(_ customEvent: any GADCustomEventInterstitial)

    Objective-C

    - (void)customEventInterstitialWillPresent:
        (nonnull id<GADCustomEventInterstitial>)customEvent;
  • Deprecated

    Use GADMediationInterstitialAdEventDelegate instead.

    Your Custom Event should call this when the interstitial is about to be dismissed.

    Declaration

    Swift

    func customEventInterstitialWillDismiss(_ customEvent: any GADCustomEventInterstitial)

    Objective-C

    - (void)customEventInterstitialWillDismiss:
        (nonnull id<GADCustomEventInterstitial>)customEvent;
  • Deprecated

    Use GADMediationInterstitialAdEventDelegate instead.

    Your Custom Event should call this when the interstitial has been dismissed.

    Declaration

    Swift

    func customEventInterstitialDidDismiss(_ customEvent: any GADCustomEventInterstitial)

    Objective-C

    - (void)customEventInterstitialDidDismiss:
        (nonnull id<GADCustomEventInterstitial>)customEvent;