ALPrivacySettings.h 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. //
  2. // ALPrivacySettings.h
  3. // AppLovinSDK
  4. //
  5. // Created by Basil Shikin on 3/26/18.
  6. // Copyright © 2020 AppLovin Corporation. All rights reserved.
  7. //
  8. NS_ASSUME_NONNULL_BEGIN
  9. /**
  10. * This class contains privacy settings for AppLovin.
  11. */
  12. @interface ALPrivacySettings : NSObject
  13. /**
  14. * Sets whether or not the user has provided consent for information-sharing with AppLovin.
  15. *
  16. * @param hasUserConsent @c YES if the user provided consent for information-sharing with AppLovin. @c NO by default.
  17. *
  18. * @see <a href="https://dash.applovin.com/documentation/mediation/ios/getting-started/privacy#general-data-protection-regulation-(%E2%80%9Cgdpr%E2%80%9D)">MAX Integration Guide ⇒ iOS ⇒ Privacy ⇒ General Data Protection Regulation ("GDPR")</a>
  19. */
  20. + (void)setHasUserConsent:(BOOL)hasUserConsent;
  21. /**
  22. * Checks if the user has provided consent for information-sharing with AppLovin.
  23. *
  24. * @return @c YES if the user provided consent for information sharing. @c NO if the user declined to share information or the consent value has not been set (see @c isUserConsentSet).
  25. *
  26. * @see <a href="https://dash.applovin.com/documentation/mediation/ios/getting-started/privacy#general-data-protection-regulation-(%E2%80%9Cgdpr%E2%80%9D)">MAX Integration Guide ⇒ iOS ⇒ Privacy ⇒ General Data Protection Regulation ("GDPR")</a>
  27. */
  28. + (BOOL)hasUserConsent;
  29. /**
  30. * Checks if user has set consent for information sharing.
  31. *
  32. * @return @c YES if user has set a value of consent for information sharing.
  33. */
  34. + (BOOL)isUserConsentSet;
  35. /**
  36. * Marks the user as age-restricted (i.e. under 16).
  37. *
  38. * @param isAgeRestrictedUser @c YES if the user is age-restricted (i.e. under 16).
  39. *
  40. * @see <a href="https://dash.applovin.com/documentation/mediation/ios/getting-started/privacy#children-data">MAX Integration Guide ⇒ iOS ⇒ Privacy ⇒ Children Data</a>
  41. */
  42. + (void)setIsAgeRestrictedUser:(BOOL)isAgeRestrictedUser;
  43. /**
  44. * Checks if the user is age-restricted.
  45. *
  46. * @return @c YES if the user is age-restricted. @c NO if the user is not age-restricted or the age-restriction value has not been set (see @c isAgeRestrictedUserSet).
  47. *
  48. * @see <a href="https://dash.applovin.com/documentation/mediation/ios/getting-started/privacy#children-data">MAX Integration Guide ⇒ iOS ⇒ Privacy ⇒ Children Data</a>
  49. */
  50. + (BOOL)isAgeRestrictedUser;
  51. /**
  52. * Checks if user has set its age restricted settings.
  53. *
  54. * @return @c YES if user has set its age restricted settings.
  55. */
  56. + (BOOL)isAgeRestrictedUserSet;
  57. /**
  58. * Sets whether or not the user has opted out of the sale of their personal information.
  59. *
  60. * @param doNotSell @c YES if the user opted out of the sale of their personal information.
  61. *
  62. * @see <a href="https://dash.applovin.com/documentation/mediation/ios/getting-started/privacy#california-consumer-privacy-act-(%E2%80%9Cccpa%E2%80%9D)">MAX Integration Guide ⇒ iOS ⇒ Privacy ⇒ California Consumer Privacy Act ("CCPA")</a>
  63. */
  64. + (void)setDoNotSell:(BOOL)doNotSell;
  65. /**
  66. * Checks if the user has opted out of the sale of their personal information.
  67. *
  68. * @return @c YES if the user opted out of the sale of their personal information. @c NO if the user opted in to the sale of their personal information or the value has not been set (see @c isDoNotSellSet).
  69. *
  70. * @see <a href="https://dash.applovin.com/documentation/mediation/ios/getting-started/privacy#california-consumer-privacy-act-(%E2%80%9Cccpa%E2%80%9D)">MAX Integration Guide ⇒ iOS ⇒ Privacy ⇒ California Consumer Privacy Act ("CCPA")</a>
  71. */
  72. + (BOOL)isDoNotSell;
  73. /**
  74. * Checks if the user has set the option to sell their personal information.
  75. *
  76. * @return @c YES if user has chosen an option to sell their personal information.
  77. */
  78. + (BOOL)isDoNotSellSet;
  79. /**
  80. * Parses the IABTCF_VendorConsents string to determine the consent status of the IAB vendor with the provided ID.
  81. *
  82. * NOTE: Must be called after AppLovin MAX SDK has been initialized.
  83. *
  84. * @param vendorIdentifier Vendor ID as defined in the Global Vendor List.
  85. *
  86. * @return @c 1 if the vendor has consent, @c 0 if not, or @c nil if TC data is not available on disk.
  87. *
  88. * @see <a href="https://vendor-list.consensu.org/v3/vendor-list.json">Current Version of Global Vendor List</a>
  89. */
  90. + (nullable NSNumber *)tcfVendorConsentStatusForIdentifier:(NSInteger)vendorIdentifier;
  91. /**
  92. * Parses the IABTCF_AddtlConsent string to determine the consent status of the advertising entity with the provided Ad Technology Provider (ATP) ID.
  93. *
  94. * NOTE: Must be called after AppLovin MAX SDK has been initialized.
  95. *
  96. * @param atpIdentifier ATP ID of the advertising entity (e.g. 89 for Meta Audience Network).
  97. *
  98. * @return @c 1 if the advertising entity has consent, @c 0 if not, or @c nil if no AC string is available on disk or the ATP network was not listed in the CMP flow.
  99. *
  100. * @see <a href="https://support.google.com/admanager/answer/9681920">Google’s Additional Consent Mode technical specification</a>
  101. * @see <a href="https://storage.googleapis.com/tcfac/additional-consent-providers.csv">List of Google ATPs and their IDs</a>
  102. */
  103. + (nullable NSNumber *)additionalConsentStatusForIdentifier:(NSInteger)atpIdentifier;
  104. /**
  105. * Parses the IABTCF_PurposeConsents String to determine the consent status of the IAB defined data processing purpose.
  106. *
  107. * NOTE: Must be called after AppLovin MAX SDK has been initialized.
  108. *
  109. * @param purposeIdentifier Purpose ID.
  110. *
  111. * @return @c 1 if the purpose has consent, @c 0 if not, or @c nil if TC data is not available on disk.
  112. *
  113. * @see <a href="https://iabeurope.eu/iab-europe-transparency-consent-framework-policies">IAB Europe Transparency & Consent Framework Policies (Appendix A)</a> for purpose definitions.
  114. */
  115. + (nullable NSNumber *)purposeConsentStatusForIdentifier:(NSInteger)purposeIdentifier;
  116. /**
  117. * Parses the IABTCF_SpecialFeaturesOptIns String to determine the opt-in status of the IAB defined special feature.
  118. *
  119. * NOTE: Must be called after AppLovin MAX SDK has been initialized.
  120. *
  121. * @param specialFeatureIdentifier Special feature ID.
  122. *
  123. * @return @c 1 if the user opted in for the special feature, @c 0 if not, or @c nil if TC data is not available on disk.
  124. *
  125. * @see <a href="https://iabeurope.eu/iab-europe-transparency-consent-framework-policies">IAB Europe Transparency & Consent Framework Policies (Appendix A)</a> for special features definitions.
  126. */
  127. + (nullable NSNumber *)specialFeatureOptInStatusForIdentifier:(NSInteger)specialFeatureIdentifier;
  128. - (instancetype)init NS_UNAVAILABLE;
  129. + (instancetype)new NS_UNAVAILABLE;
  130. @end
  131. NS_ASSUME_NONNULL_END