MANativeAdAdapterDelegate.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. //
  2. // MANativeAdAdapterDelegate.h
  3. // AppLovinSDK
  4. //
  5. // Created by Thomas So on 6/15/21.
  6. //
  7. #import <AppLovinSDK/MAAdapterDelegate.h>
  8. @class MAAdapterError;
  9. @class MANativeAd;
  10. NS_ASSUME_NONNULL_BEGIN
  11. /**
  12. * Protocol for adapters to forward ad load and display events to the MAX SDK for native ads.
  13. */
  14. @protocol MANativeAdAdapterDelegate <MAAdapterDelegate>
  15. /**
  16. * This method should called when an ad has been loaded.
  17. *
  18. * @param nativeAd Native ad container containing the assets from the mediated network's native ad.
  19. * @param extraInfo Extra info passed from the adapter.
  20. */
  21. - (void)didLoadAdForNativeAd:(MANativeAd *)nativeAd withExtraInfo:(nullable NSDictionary<NSString *, id> *)extraInfo;
  22. /**
  23. * This method should be called when an ad could not be loaded.
  24. *
  25. * @param adapterError An error object that indicates the cause of ad failure.
  26. */
  27. - (void)didFailToLoadNativeAdWithError:(MAAdapterError *)adapterError;
  28. /**
  29. * This method should be called when the adapter has successfully displayed an ad to the user.
  30. * Note: Display callbacks are not forwarded to the publisher, however revenue events that are associated with the display event are.
  31. *
  32. * @param extraInfo Extra info passed from the adapter.
  33. */
  34. - (void)didDisplayNativeAdWithExtraInfo:(nullable NSDictionary<NSString *, id> *)extraInfo;
  35. /**
  36. * This method should be called when the user has clicked adapter's ad.
  37. */
  38. - (void)didClickNativeAd;
  39. /**
  40. * This method should be called when the user has clicked adapter's ad.
  41. *
  42. * @param extraInfo Extra info passed from the adapter.
  43. */
  44. - (void)didClickNativeAdWithExtraInfo:(nullable NSDictionary<NSString *, id> *)extraInfo;
  45. @end
  46. NS_ASSUME_NONNULL_END