MPNativeAdAdapterDelegate /5.0.0

@protocol MPNativeAdAdapterDelegate <NSObject>

Classes that conform to the MPNativeAdAdapter protocol can have an MPNativeAdAdapterDelegate delegate object. You use this delegate to communicate native ad events, such as impressions and clicks occurring, back to the MoPub SDK.

Public Methods

-/viewControllerForPresentingModalView /+5.0.0

  • Description: Asks the delegate for a view controller to use for presenting modal content, such as the in-app browser that can appear when an ad is tapped.

  • Declaration:

    - (UIViewController *)viewControllerForPresentingModalView;
    
  • Parameters: None.

-/nativeAdWillPresentModalForAdapter: /+5.0.0

  • Description: Call this method when your adapter’s modal is about to be presented.

  • Declaration:

    - (void)nativeAdWillPresentModalForAdapter:(id<MPNativeAdAdapter>)adapter;
    
  • Parameters:

    • adapter: The adapter that will present the modal.

-/nativeAdDidDismissModalForAdapter: /+5.0.0

  • Description: Call this method when your adapter’s modal has been dismissed.

  • Declaration:

    - (void)nativeAdDidDismissModalForAdapter:(id<MPNativeAdAdapter>)adapter;
    
  • Parameters:

    • adapter: The adapter that dismissed the modal.

-/nativeAdWillLeaveApplicationFromAdapter: /+5.0.0

  • Description: Call this method when your the user will leave the application due to interaction with the ad.

  • Declaration:

    - (void)nativeAdWillLeaveApplicationFromAdapter:(id<MPNativeAdAdapter>)adapter;
    
  • Parameters:

    • adapter: The adapter that represents the ad that caused the user to leave the application.

-/nativeAdWillLogImpression: /+5.0.0

  • Description: This method is called before the backing native ad logs an impression.

  • Declaration:

    - (void)nativeAdWillLogImpression:(id<MPNativeAdAdapter>)adAdapter;
    
  • Parameters:

    • adAdapter: Pass self to allow the MoPub SDK to associate this event with the correct instance of your ad adapter.

-/nativeAdDidClick: /+5.0.0

  • Description: This method is called when the user interacts with the ad.

  • Declaration:

    - (void)nativeAdDidClick:(id<MPNativeAdAdapter>)adAdapter;
    
  • Parameters:

    • adAdapter: Pass self to allow the MoPub SDK to associate this event with the correct instance of your ad adapter.

Last updated October 06, 2020

TWITTER, MOPUB, and the Bird logo are trademarks of Twitter, Inc. or its affiliates. All third party logos and trademarks included are the property of their respective owners.

© 2020 MoPub (a division of Twitter, Inc.)