MAError.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. //
  2. // MAError+Internal.h
  3. // AppLovinSDK
  4. //
  5. // Created by Thomas So on 5/3/21.
  6. //
  7. #import <AppLovinSDK/MAErrorCode.h>
  8. @class MAAdWaterfallInfo;
  9. NS_ASSUME_NONNULL_BEGIN
  10. /**
  11. * This class encapsulates various data for MAX load and display errors.
  12. */
  13. @interface MAError : NSObject
  14. /**
  15. * The error code for the error. Will be one of the codes listed under the @c MAErrorCode enum.
  16. */
  17. @property (nonatomic, assign, readonly) MAErrorCode code;
  18. /**
  19. * The error message for the error.
  20. */
  21. @property (nonatomic, copy, readonly) NSString *message;
  22. /**
  23. * The mediated network's error code for the error. Available for errors returned in @c -[MAAdDelegate didFailToDisplayAd:withError:] only.
  24. */
  25. @property (nonatomic, assign, readonly) NSInteger mediatedNetworkErrorCode;
  26. /**
  27. * The mediated network's error message for the error. Defaults to an empty string. Available for errors returned in @c -[MAAdDelegate didFailToDisplayAd:withError:] only.
  28. */
  29. @property (nonatomic, copy, readonly) NSString *mediatedNetworkErrorMessage;
  30. /**
  31. * The underlying waterfall of ad responses.
  32. */
  33. @property (nonatomic, strong, readonly, nullable) MAAdWaterfallInfo *waterfall;
  34. /**
  35. * The latency of the mediation ad load request in seconds.
  36. */
  37. @property (nonatomic, assign, readonly) NSTimeInterval requestLatency;
  38. - (instancetype)init NS_UNAVAILABLE;
  39. - (instancetype)new NS_UNAVAILABLE;
  40. @end
  41. @interface MAError (ALDeprecated)
  42. @property (nonatomic, assign, readonly) NSInteger errorCode __deprecated_msg("This property is deprecated and removed in a future SDK version. Please use `-[MAError code]` instead.");
  43. @property (nonatomic, copy, readonly) NSString *errorMessage __deprecated_msg("This property is deprecated and removed in a future SDK version. Please use `-[MAError message]` instead.");
  44. @property (nonatomic, copy, readonly, nullable) NSString *adLoadFailureInfo __deprecated_msg("The ad load failure info string is deprecated and removed in a future SDK version. Please use `-[MAError waterfall]` instead.");
  45. @end
  46. NS_ASSUME_NONNULL_END