MAAdViewAdapterDelegate.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. //
  2. // MAAdViewAdapterDelegate.h
  3. // AppLovinSDK
  4. //
  5. // Created by Thomas So on 8/10/18.
  6. // Copyright © 2019 AppLovin Corporation. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. #import <AppLovinSDK/MAAdapterDelegate.h>
  10. @class MAAdapterError;
  11. NS_ASSUME_NONNULL_BEGIN
  12. /**
  13. * Protocol for adapters to forward ad load and display events to the MAX SDK for adview ads.
  14. */
  15. @protocol MAAdViewAdapterDelegate <MAAdapterDelegate>
  16. /**
  17. * This method should called when an ad has been loaded.
  18. *
  19. * @param adView Ad view that contains the loaded ad.
  20. */
  21. - (void)didLoadAdForAdView:(UIView *)adView;
  22. /**
  23. * This method should called when an ad has been loaded.
  24. *
  25. * @param adView Ad view that contains the loaded ad.
  26. * @param extraInfo Extra info passed from the adapter.
  27. */
  28. - (void)didLoadAdForAdView:(UIView *)adView withExtraInfo:(nullable NSDictionary<NSString *, id> *)extraInfo;
  29. /**
  30. * This method is should be called when an ad could not be loaded.
  31. *
  32. * @param adapterError An error object that indicates the cause of ad failure.
  33. */
  34. - (void)didFailToLoadAdViewAdWithError:(MAAdapterError *)adapterError;
  35. /**
  36. * This method should be called when the adapter has successfully displayed an ad to the user.
  37. */
  38. - (void)didDisplayAdViewAd;
  39. /**
  40. * This method should be called when the adapter has successfully displayed an ad to the user.
  41. *
  42. * @param extraInfo Extra info passed from the adapter.
  43. */
  44. - (void)didDisplayAdViewAdWithExtraInfo:(nullable NSDictionary<NSString *, id> *)extraInfo;
  45. /**
  46. * This method is should be called when an ad could not be displayed.
  47. *
  48. * @param adapterError An error object that indicates the cause of the failure.
  49. */
  50. - (void)didFailToDisplayAdViewAdWithError:(MAAdapterError *)adapterError;
  51. /**
  52. * This method is should be called when an ad could not be displayed.
  53. *
  54. * @param adapterError An error object that indicates the cause of the failure.
  55. * @param extraInfo Extra info passed from the adapter.
  56. */
  57. - (void)didFailToDisplayAdViewAdWithError:(MAAdapterError *)adapterError extraInfo:(nullable NSDictionary<NSString *, id> *)extraInfo;
  58. /**
  59. * This method should be called when the user has clicked adapter's ad.
  60. */
  61. - (void)didClickAdViewAd;
  62. /**
  63. * This method should be called when the user has clicked adapter's ad.
  64. *
  65. * @param extraInfo Extra info passed from the adapter.
  66. */
  67. - (void)didClickAdViewAdWithExtraInfo:(nullable NSDictionary<NSString *, id> *)extraInfo;
  68. /**
  69. * This method should be called when adapter's ad has been dismissed.
  70. */
  71. - (void)didHideAdViewAd;
  72. /**
  73. * This method should be called when adapter's ad has been dismissed.
  74. *
  75. * @param extraInfo Extra info passed from the adapter.
  76. */
  77. - (void)didHideAdViewAdWithExtraInfo:(nullable NSDictionary<NSString *, id> *)extraInfo;
  78. /**
  79. * This method should be called when the ad view has expanded full screen.
  80. */
  81. - (void)didExpandAdViewAd;
  82. /**
  83. * This method should be called when the ad view has expanded full screen.
  84. *
  85. * @param extraInfo Extra info passed from the adapter.
  86. */
  87. - (void)didExpandAdViewAdWithExtraInfo:(nullable NSDictionary<NSString *, id> *)extraInfo;
  88. /**
  89. * This method should be called when the ad view has collapsed from its full screen state.
  90. */
  91. - (void)didCollapseAdViewAd;
  92. /**
  93. * This method should be called when the ad view has collapsed from its full screen state.
  94. *
  95. * @param extraInfo Extra info passed from the adapter.
  96. */
  97. - (void)didCollapseAdViewAdWithExtraInfo:(nullable NSDictionary<NSString *, id> *)extraInfo;
  98. @end
  99. NS_ASSUME_NONNULL_END