MAAdapterParameters.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. //
  2. // MAAdapterParameters.h
  3. // AppLovinSDK
  4. //
  5. // Created by Thomas So on 8/27/18.
  6. //
  7. #import <UIKit/UIKit.h>
  8. NS_ASSUME_NONNULL_BEGIN
  9. /**
  10. * This protocol defines basic parameters passed to all adapter events.
  11. */
  12. @protocol MAAdapterParameters <NSObject>
  13. /**
  14. * *********************
  15. * AVAILABLE IN v11.0.0+
  16. * *********************
  17. * <p>
  18. * The MAX Ad Unit ID the adapter operation with these parameters are being performed for.
  19. *
  20. * @return The MAX Ad Unit ID to perform the adapter operation for. Guaranteed not to be null.
  21. */
  22. @property (nonatomic, copy, readonly) NSString *adUnitIdentifier;
  23. /**
  24. * *********************
  25. * AVAILABLE IN v11.0.0+
  26. * *********************
  27. * <p>
  28. * Local extra parameters to passed in from the integration code.
  29. *
  30. * @return Local extra parameters. Guaranteed not to be @c nil.
  31. */
  32. @property (nonatomic, strong, readonly) NSDictionary<NSString *, id> *localExtraParameters;
  33. /**
  34. * Get parameters passed from AppLovin server to the current adapter.
  35. *
  36. * @return Server parameters. Guaranteed not to be nil.
  37. */
  38. @property (nonatomic, strong, readonly) NSDictionary<NSString *, id> *serverParameters;
  39. /**
  40. * *********************
  41. * AVAILABLE IN v11.1.1+
  42. * *********************
  43. * <p>
  44. * Get custom parameters passed from AppLovin server to the current custom network SDK adapter.
  45. *
  46. * @return Custom parameters. Guaranteed not to be @c nil.
  47. */
  48. @property (nonatomic, strong, readonly) NSDictionary<NSString *, id> *customParameters;
  49. /**
  50. * Current state of user consent.
  51. *
  52. * @return @c 1 if the user has provided consent for information sharing. @c nil if not set.
  53. */
  54. @property (nonatomic, strong, readonly, nullable, getter=hasUserConsent) NSNumber *userConsent;
  55. /**
  56. * Current state of user age restrictions.
  57. *
  58. * @return @c 1 if the user is age restricted (i.e. under 16). @c nil if not set.
  59. */
  60. @property (nonatomic, strong, readonly, nullable, getter=isAgeRestrictedUser) NSNumber *ageRestrictedUser;
  61. /**
  62. * Current state of whether ot not the user has opted out of the sale of their personal information.
  63. *
  64. * @return @c 1 if the user has opted out of the sale of their personal information. @c nil if not set.
  65. */
  66. @property (nonatomic, strong, readonly, nullable, getter=isDoNotSell) NSNumber *doNotSell;
  67. /**
  68. * *********************
  69. * AVAILABLE IN v11.4.2+
  70. * *********************
  71. * <p>
  72. * The consent string to pass to networks that do not support a binary consent API (i.e. networks that use TCF-only) and do not automatically ingest the string from User Defaults.
  73. */
  74. @property (nonatomic, copy, readonly, nullable) NSString *consentString;
  75. /**
  76. * Check if this request is made for testing.
  77. *
  78. * @return @c YES if the ads should be retrieved for testing.
  79. */
  80. @property (nonatomic, assign, readonly, getter=isTesting) BOOL testing;
  81. /**
  82. * @return The view controller to present the fullscreen ad with.
  83. */
  84. @property (nonatomic, weak, readonly, nullable) UIViewController *presentingViewController;
  85. @end
  86. NS_ASSUME_NONNULL_END