MPNativeCustomEventDelegate /5.0.0

@protocol MPNativeCustomEventDelegate <NSObject>

Instances of your custom subclass of MPNativeCustomEvent will have an MPNativeCustomEventDelegate delegate object. This delegate communicates progress (such as whether an ad has loaded successfully) back to the MoPub SDK.

Public Methods

-/nativeCustomEvent:didLoadAd: /+5.0.0

  • Description: Called when the ad and all required ad assets are loaded.

  • Declaration:

    - (void)nativeCustomEvent:(MPNativeCustomEvent *)event
                  didLoadAd:(MPNativeAd *)adObject;
    
  • Parameters:

    • event: Pass self to allow the MoPub SDK to associate this event with the correct instance of your mediation adapter.
    • adObject: An MPNativeAd object, representing the ad that was retrieved.

-/nativeCustomEvent:didFailToLoadAdWithError: /+5.0.0

  • Description: This method is called when the ad or any required ad assets fail to load.

  • Declaration:

    - (void)nativeCustomEvent:(MPNativeCustomEvent *)event
      didFailToLoadAdWithError:(NSError *)error;
    
  • Parameters:

    • event: Pass self to allow the MoPub SDK to associate this event with the correct instance of your mediation adapter.
    • error: Optional. You may pass an error describing the failure.

Last updated July 10, 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.)