# GoogleMobileAds Framework Reference

# GADCustomEventNativeAd

Deprecated

Use GADMediationNativeAd and GADMediationAdapter instead.

    @protocol GADCustomEventNativeAd <NSObject>

Native ad custom event protocol. Your native ad custom event handler class must conform to this
protocol.
- `


  ### [delegate](https://developers.google.com/admob/ios/api/reference/Protocols/GADCustomEventNativeAd#/c:objc(pl)GADCustomEventNativeAd(py)delegate)


  ` Deprecated

  Use GADMediationNativeAd and GADMediationAdapter instead.
  Delegate object used for receiving custom native ad load request progress.

  #### Declaration

  Swift

      weak var delegate: (any https://developers.google.com/admob/ios/api/reference/Protocols/GADCustomEventNativeAdDelegate.html)? { get set }

  Objective-C

      @property (nonatomic, weak, nullable) id<https://developers.google.com/admob/ios/api/reference/Protocols/GADCustomEventNativeAdDelegate.html> delegate;

- `


  ### [-init](https://developers.google.com/admob/ios/api/reference/Protocols/GADCustomEventNativeAd#/c:objc(pl)GADCustomEventNativeAd(im)init)


  ` Deprecated

  Use GADMediationNativeAd and GADMediationAdapter instead.
  Returns an initialized custom event native ad.

  #### Declaration

  Swift

      init()

  Objective-C

      - (nonnull instancetype)init;

- `


  ### [-requestNativeAdWithParameter:request:adTypes:options:rootViewController:](https://developers.google.com/admob/ios/api/reference/Protocols/GADCustomEventNativeAd#/c:objc(pl)GADCustomEventNativeAd(im)requestNativeAdWithParameter:request:adTypes:options:rootViewController:)


  ` Deprecated

  Use GADMediationNativeAd and GADMediationAdapter instead.
  Called when the custom event is scheduled to be executed.

  #### Declaration

  Swift

      func request(withParameter serverParameter: String, request: CustomEventRequest, adTypes: [Any], options: [Any], rootViewController: UIViewController)

  Objective-C

      - (void)requestNativeAdWithParameter:(nonnull NSString *)serverParameter
                                   request:(nonnull https://developers.google.com/admob/ios/api/reference/Classes/GADCustomEventRequest.html *)request
                                   adTypes:(nonnull NSArray *)adTypes
                                   options:(nonnull NSArray *)options
                        rootViewController:
                            (nonnull UIViewController *)rootViewController;

  #### Parameters

  |---|---|
  | ` serverParameter ` | A value configured in the mediation UI for the custom event. |
  | ` request ` | Ad targeting information. |
  | ` adTypes ` | List of requested native ad types. See GADAdLoaderAdTypes.h for available ad types. |
  | ` options ` | Additional options configured by the publisher for requesting a native ad. See GADNativeAdImageAdLoaderOptions.h for available image options. |
  | ` rootViewController ` | Publisher-provided view controller. |

- `


  ### [-handlesUserClicks](https://developers.google.com/admob/ios/api/reference/Protocols/GADCustomEventNativeAd#/c:objc(pl)GADCustomEventNativeAd(im)handlesUserClicks)


  ` Deprecated

  Use GADMediationNativeAd and GADMediationAdapter instead.
  Indicates whether the custom event handles user clicks. Return YES if the custom event should
  handle user clicks. In this case, the Google Mobile Ads SDK doesn't track user clicks and the
  custom event must notify the Google Mobile Ads SDK of clicks using
  +\[GADMediatedNativeAdNotificationSource mediatedNativeAdDidRecordClick:\]. Return NO if the
  custom event doesn't handles user clicks. In this case, the Google Mobile Ads SDK tracks user
  clicks itself and the custom event is notified of user clicks through
  -\[GADMediatedUnifiedNativeAd didRecordClickOnAssetWithName:view:viewController:\].

  #### Declaration

  Swift

      func handlesUserClicks() -> Bool

  Objective-C

      - (BOOL)handlesUserClicks;

- `


  ### [-handlesUserImpressions](https://developers.google.com/admob/ios/api/reference/Protocols/GADCustomEventNativeAd#/c:objc(pl)GADCustomEventNativeAd(im)handlesUserImpressions)


  ` Deprecated

  Use GADMediationNativeAd and GADMediationAdapter instead.
  Indicates whether the custom event handles user impressions tracking. If this method returns
  YES, the Google Mobile Ads SDK will not track user impressions and the custom event must notify
  the Google Mobile Ads SDK of impressions using +\[GADMediatedNativeAdNotificationSource
  mediatedNativeAdDidRecordImpression:\]. If this method returns NO, the Google Mobile Ads SDK
  tracks user impressions and notifies the custom event of impressions using
  -\[GADMediatedUnifiedNativeAd didRecordImpression\].

  #### Declaration

  Swift

      func handlesUserImpressions() -> Bool

  Objective-C

      - (BOOL)handlesUserImpressions;