美国 IAB 支持

本指南介绍了通过 UMP SDK 支持美国州级法规消息的操作步骤。请将这些说明与使用入门搭配使用,后者详细介绍了如何在您的应用中运行 UMP SDK 并设置消息。以下指南专门针对美国州级法规消息。

前提条件

在继续之前,请确保您已完成以下操作:

  • 更新到最新版本的 UMP SDK。 为了支持美国各州的法规消息传递,我们建议您使用 2.1.0 或更高版本。
  • 完成入门指南的学习。 请务必实现隐私选项入口点,并在需要时呈现该入口点。完成本指南后,您将获得一个入口点,用于向用户展示美国州级法规消息。
  • 为应用创建美国州级法规消息
  • 如果您同时使用美国州级法规消息和其他消息,请参阅可用的用户消息类型,了解系统何时向用户显示不同的消息。

如需指明用户是否未达到自主年龄,请设置 tagForUnderAgeOfConsent (TFUA)。如果您将 TFUA 设置为 true,UMP SDK 便不会向用户请求意见征求。如果您的应用的目标受众群体涵盖多个年龄段,请为儿童用户设置此参数,以确保系统不会请求征得同意。您有责任在必要时设置此参数,以遵守《儿童在线隐私保护法》(COPPA) 和其他相关法规。

以下示例在 UMP 意见征求请求中将 TFUA 设置为 true:

Swift

// Create a UMPRequestParameters object.
let parameters = RequestParameters()
// Indicate the user is under age of consent.
parameters.isTaggedForUnderAgeOfConsent = true

// Request an update for the consent information.
ConsentInformation.shared.requestConsentInfoUpdate(with: parameters) {
  [weak self] requestConsentError in
  guard let self else { return }

  // ...
}

Objective-C

// Create a UMPRequestParameters object.
UMPRequestParameters *parameters = [[UMPRequestParameters alloc] init];
// Indicate the user is under age of consent.
parameters.tagForUnderAgeOfConsent = YES;

// Request an update for the consent information.
[UMPConsentInformation.sharedInstance
    requestConsentInfoUpdateWithParameters:parameters
        completionHandler:^(NSError *_Nullable requestConsentError) {
          // ...
        }];

用户根据美国州级法规做出选择后,您可以按照全球隐私保护平台 (GPP) 规范从本地存储空间读取其选择。如需了解详情,请参阅应用内详细信息。 请注意,UMP SDK 仅填充 IABGPP_GppSIDIABGPP_HDR_GppString 键。

测试美国州级法规消息

如需测试美国各州法规消息,请使用 UMPDebugGeographyRegulatedUSState debugGeography 强制 UMP SDK 将您的测试设备视为位于受监管的美国州。您还可以使用 UMPDebugGeographyOther 强制禁止显示美国州级法规消息。如需详细了解 debugGeography,请参阅强制调试地理位置