MARewardedInterstitialAdapterDelegate.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. //
  2. // MARewardedInterstitialAdapterDelegate.h
  3. // AppLovinSDK
  4. //
  5. // Created by Thomas So on 6/3/20.
  6. //
  7. #import <AppLovinSDK/MAAdapterDelegate.h>
  8. @class MAAdapterError;
  9. @class MAReward;
  10. NS_ASSUME_NONNULL_BEGIN
  11. /**
  12. * Protocol for adapters to forward ad load and display events to the MAX SDK for rewarded interstitial ads.
  13. */
  14. @protocol MARewardedInterstitialAdapterDelegate <MAAdapterDelegate>
  15. /**
  16. * This method should called when an ad has been loaded.
  17. */
  18. - (void)didLoadRewardedInterstitialAd;
  19. /**
  20. * This method should called when an ad has been loaded.
  21. *
  22. * @param extraInfo Extra info passed from the adapter.
  23. */
  24. - (void)didLoadRewardedInterstitialAdWithExtraInfo:(nullable NSDictionary<NSString *, id> *)extraInfo;
  25. /**
  26. * This method should be called when an ad could not be loaded.
  27. *
  28. * @param adapterError An error that indicates the cause of the failure.
  29. */
  30. - (void)didFailToLoadRewardedInterstitialAdWithError:(MAAdapterError *)adapterError;
  31. /**
  32. * This method should be called when the adapter has successfully displayed an ad to the user.
  33. */
  34. - (void)didDisplayRewardedInterstitialAd;
  35. /**
  36. * This method should be called when the adapter has successfully displayed an ad to the user.
  37. *
  38. * @param extraInfo Extra info passed from the adapter.
  39. */
  40. - (void)didDisplayRewardedInterstitialAdWithExtraInfo:(nullable NSDictionary<NSString *, id> *)extraInfo;
  41. /**
  42. * This method is should be called when an ad could not be displayed.
  43. *
  44. * @param adapterError An error that indicates the cause of the failure.
  45. */
  46. - (void)didFailToDisplayRewardedInterstitialAdWithError:(MAAdapterError *)adapterError;
  47. /**
  48. * This method is should be called when an ad could not be displayed.
  49. *
  50. * @param adapterError An error that indicates the cause of the failure.
  51. * @param extraInfo Extra info passed from the adapter.
  52. */
  53. - (void)didFailToDisplayRewardedInterstitialAdWithError:(MAAdapterError *)adapterError extraInfo:(nullable NSDictionary<NSString *, id> *)extraInfo;
  54. /**
  55. * This method should be called when the user has clicked adapter's ad.
  56. */
  57. - (void)didClickRewardedInterstitialAd;
  58. /**
  59. * This method should be called when the user has clicked adapter's ad.
  60. */
  61. - (void)didClickRewardedInterstitialAdWithExtraInfo:(nullable NSDictionary<NSString *, id> *)extraInfo;
  62. /**
  63. * This method should be called when adapter's ad has been dismissed.
  64. */
  65. - (void)didHideRewardedInterstitialAd;
  66. /**
  67. * This method should be called when adapter's ad has been dismissed.
  68. */
  69. - (void)didHideRewardedInterstitialAdWithExtraInfo:(nullable NSDictionary<NSString *, id> *)extraInfo;
  70. /**
  71. * This method should be invoked when a user should be granted a reward.
  72. *
  73. * @param reward The reward to be granted to the user.
  74. */
  75. - (void)didRewardUserWithReward:(MAReward *)reward;
  76. /**
  77. * This method should be invoked when a user should be granted a reward.
  78. *
  79. * @param reward The reward to be granted to the user.
  80. * @param extraInfo Extra info passed from the adapter.
  81. */
  82. - (void)didRewardUserWithReward:(MAReward *)reward extraInfo:(nullable NSDictionary<NSString *, id> *)extraInfo;
  83. @optional
  84. - (void)didStartRewardedInterstitialAdVideo
  85. __deprecated_msg("This API is deprecated because not all adapters support this callback. Please use -[MARewardedInterstitialAdapterDelegate didDisplayRewardedInterstitialAd:] instead");
  86. - (void)didCompleteRewardedInterstitialAdVideo
  87. __deprecated_msg("This API is deprecated because not all adapters support this callback. Please use -[MARewardedInterstitialAdapterDelegate didHideRewardedInterstitialAd:] instead");
  88. @end
  89. NS_ASSUME_NONNULL_END