GoogleMobileAds Framework Reference

  • The GADNativeAdUnconfirmedClickDelegate handles unconfirmed clicks on Google native ads, allowing publishers to manage user interface changes and click confirmations.

  • When an unconfirmed click occurs, nativeAd:didReceiveUnconfirmedClickOnAssetID: is called, prompting the publisher to update the UI and request user confirmation.

  • Publishers should register a click-confirming view using registerClickConfirmingView: in GADNativeAd+ConfirmedClick.h.

  • If the unconfirmed click is canceled, nativeAdDidCancelUnconfirmedClick: is called, allowing publishers to revert UI changes.

  • This delegate applies only to Google ads and is not supported by mediated ads.

GADNativeAdUnconfirmedClickDelegate

@protocol GADNativeAdUnconfirmedClickDelegate <NSObject>

Delegate methods for handling native ad unconfirmed clicks.

  • Tells the delegate that native ad receives an unconfirmed click on view with asset ID. You should update user interface and ask user to confirm the click once this message is received. Use the -registerClickConfirmingView: method in GADNativeAd+ConfirmedClick.h to register a view that will confirm the click. Only called for Google ads and is not supported for mediated ads.

    Declaration

    Swift

    func nativeAd(_ nativeAd: GADNativeAd, didReceiveUnconfirmedClickOnAssetID assetID: GADNativeAssetIdentifier)

    Objective-C

    - (void)nativeAd:(nonnull GADNativeAd *)nativeAd
        didReceiveUnconfirmedClickOnAssetID:
            (nonnull GADNativeAssetIdentifier)assetID;
  • Tells the delegate that the unconfirmed click is cancelled. You should revert the user interface change once this message is received. Only called for Google ads and is not supported for mediated ads.

    Declaration

    Swift

    func nativeAdDidCancelUnconfirmedClick(_ nativeAd: GADNativeAd)

    Objective-C

    - (void)nativeAdDidCancelUnconfirmedClick:(nonnull GADNativeAd *)nativeAd;