Este guia descreve as etapas necessárias para oferecer suporte à mensagem das regulamentações estaduais dos EUA
como parte do SDK da UMP. Combine estas instruções com o guia Começar, que detalha como executar seu app com o SDK da UMP e configurar sua mensagem. As orientações a seguir são específicas para a mensagem das regulamentações estaduais dos EUA.
Pré-requisitos
Antes de continuar, faça o seguinte:
Atualize para a versão mais recente do SDK da UMP.
Para suporte a mensagens de regulamentações estaduais dos EUA, recomendamos usar a versão
2.1.0
ou mais recente.
Conclua
Começar.
Implemente um ponto de entrada para as opções de privacidade e renderize-o se
necessário. Ao concluir este guia, você terá um ponto de entrada para veicular a mensagem sobre as regulamentações estaduais dos EUA aos seus usuários.
Se você estiver usando a mensagem das regulamentações estaduais dos EUA com outras mensagens, consulte Tipos de mensagens aos usuários disponíveis para entender quando diferentes mensagens são mostradas aos usuários.
Definir a tag para usuários abaixo da idade de consentimento
Para indicar se um usuário está abaixo da idade de consentimento, defina
tagForUnderAgeOfConsent (TFUA). Quando você define TFUA como true, o SDK da UMP
não pede consentimento do usuário. Se o app tiver um público misto, defina esse parâmetro para usuários crianças e garanta que o consentimento não seja solicitado.
É sua responsabilidade definir esse parâmetro quando necessário para obedecer à COPPA e outras regulamentações relevantes.
O exemplo a seguir define TFUA como "true" em uma solicitação de consentimento da UMP:
Swift
// Create a UMPRequestParameters object.letparameters=RequestParameters()// Indicate the user is under age of consent.parameters.isTaggedForUnderAgeOfConsent=true// Request an update for the consent information.ConsentInformation.shared.requestConsentInfoUpdate(with:parameters){[weakself]requestConsentErroringuardletselfelse{return}// ...}
Objective-C
// Create a UMPRequestParameters object.UMPRequestParameters*parameters=[[UMPRequestParametersalloc]init];// Indicate the user is under age of consent.parameters.tagForUnderAgeOfConsent=YES;// Request an update for the consent information.[UMPConsentInformation.sharedInstancerequestConsentInfoUpdateWithParameters:parameterscompletionHandler:^(NSError*_NullablerequestConsentError){// ...}];
Ler opções de consentimento
Depois que o usuário tomar uma decisão sobre as regulamentações estaduais dos EUA, você poderá ler
a escolha dele no armazenamento local seguindo a especificação da Plataforma de Privacidade Global (GPP)
. Para mais detalhes, consulte
Detalhes no app.
O SDK da UMP preenche apenas as chaves IABGPP_GppSID e IABGPP_HDR_GppString.
Testar suas mensagens sobre as regulamentações estaduais dos EUA
Para testar as mensagens das regulamentações dos estados dos EUA, use o
UMPDebugGeographyRegulatedUSStatedebugGeography para forçar o SDK
da UMP a tratar seu dispositivo de teste como se ele estivesse localizado em um estado regulamentado dos EUA. Você também pode usar UMPDebugGeographyOther para forçar a supressão das mensagens sobre regulamentações estaduais dos EUA. Para mais detalhes sobre debugGeography, consulte
Forçar uma região geográfica.
[null,null,["Última atualização 2025-09-02 UTC."],[[["\u003cp\u003eThis guide explains how to integrate the US state regulations message into your iOS app using the User Messaging Platform (UMP) SDK.\u003c/p\u003e\n"],["\u003cp\u003eBefore starting, update to UMP SDK v2.1.0 or higher, set up a privacy options entrypoint, create a US state regulations message in Ad Manager, and review message display logic.\u003c/p\u003e\n"],["\u003cp\u003eUse the \u003ccode\u003etagForUnderAgeOfConsent\u003c/code\u003e parameter in your UMP request to indicate users under the age of consent, crucial for complying with COPPA and other regulations.\u003c/p\u003e\n"],["\u003cp\u003eAccess user consent choices after they interact with the US state regulations message by reading data stored according to the Global Privacy Platform (GPP) specifications.\u003c/p\u003e\n"],["\u003cp\u003eUtilize \u003ccode\u003edebugGeography\u003c/code\u003e settings, such as \u003ccode\u003eUMPDebugGeographyRegulatedUSState\u003c/code\u003e, to simulate different locations and test your implementation thoroughly.\u003c/p\u003e\n"]]],[],null,["Select platform: [Android](/ad-manager/mobile-ads-sdk/android/privacy/us-iab-support \"View this page for the Android platform docs.\") [iOS](/ad-manager/mobile-ads-sdk/ios/privacy/us-iab-support \"View this page for the iOS platform docs.\") [Unity](/ad-manager/mobile-ads-sdk/unity/privacy/us-iab-support \"View this page for the Unity platform docs.\")\n\n\u003cbr /\u003e\n\nThis guide outlines the steps required to support the US states regulations\nmessage as part of the UMP SDK. Pair these instructions with\n[Get started](/ad-manager/mobile-ads-sdk/ios/privacy), which details how to get your app running\nwith the UMP SDK and set up your message. The following guidance is specific to\nthe US states regulations message.\n\nPrerequisites\n\nBefore continuing, ensure you do the following:\n\n- Update to the latest version of the UMP SDK. For US states regulations messaging support, we recommend you to use version 2.1.0 or higher.\n- Complete [Get started](/ad-manager/mobile-ads-sdk/ios/privacy). Be sure to implement a privacy options entrypoint and render it if required. By completing this guide, you have an entrypoint to serve your US states regulations message to your users.\n- [Create a US state regulations message](//support.google.com/admanager/answer/10115735) for apps.\n- If you're using the US states regulations message alongside other messages, consult [Available user message types](//support.google.com/admanager/answer/10075998) to understand when different messages are displayed to your users.\n\nSet the tag for under age of consent\n\nTo indicate whether a user is under the age of consent, set\n`\n`[tagForUnderAgeOfConsent](/ad-manager/mobile-ads-sdk/ios/privacy/api/reference/Classes/UMPRequestParameters#tagforunderageofconsent) (TFUA). When you set TFUA to `true`, the UMP SDK\ndoesn't request consent from the user. If your app has a mixed audience, set\nthis parameter for child users to ensure consent is not requested.\nIt is your\nresponsibility for setting this parameter where necessary to comply with COPPA\nand other relevant regulations.\n| **Important:** The UMP SDK does not forward the TFUA tag set on consent requests to the Google Mobile Ads SDK. You must explicitly set the `tagForUnderAgeOfConsent` or `tagForChildDirectectedTreatment` on ad requests. If you don't set the `tagForUnderAgeOfConsent` or `tagForChildDirectectedTreatment` on ad requests, the UMP SDK does not collect any information that allows Google to determine whether or not users under the age of consent use your app. For more information about data processing restrictions for these users, see [Tag an ad request for child-directed treatment](//support.google.com/admanager/answer/3671211).\n\nThe following example sets TFUA to true on a UMP consent request: \n\nSwift \n\n // Create a UMPRequestParameters object.\n let parameters = RequestParameters()\n // Indicate the user is under age of consent.\n parameters.isTaggedForUnderAgeOfConsent = true\n\n // Request an update for the consent information.\n ConsentInformation.shared.requestConsentInfoUpdate(with: parameters) {\n [weak self] requestConsentError in\n guard let self else { return }\n\n // ...\n }\n\nObjective-C \n\n // Create a UMPRequestParameters object.\n UMPRequestParameters \\*parameters = \\[\\[UMPRequestParameters alloc\\] init\\];\n // Indicate the user is under age of consent.\n parameters.tagForUnderAgeOfConsent = YES;\n\n // Request an update for the consent information.\n [UMPConsentInformation.sharedInstance\n requestConsentInfoUpdateWithParameters:parameters\n completionHandler:^(NSError *_Nullable requestConsentError) {\n // ...\n }];\n\nRead consent choices\n\nAfter the user has made a US states regulations decision, you can read\ntheir choice from local storage following the Global Privacy Platform (GPP)\nspec. For more details see,\n[In-App Details](https://github.com/InteractiveAdvertisingBureau/Global-Privacy-Platform/blob/main/Core/CMP%20API%20Specification.md#in-app-details).\nNote that the UMP SDK only populates the `IABGPP_GppSID` and\n`IABGPP_HDR_GppString` keys.\n\nTest your US states regulations messaging\n\nTo test your US states regulations messaging, use the\n`UMPDebugGeographyRegulatedUSState` `debugGeography` to force the UMP\nSDK to treat your test device as if the device were located in a regulated US\nstate. You can also use `UMPDebugGeographyOther` to force suppression of US\nstates regulations messages. For more details on `debugGeography`, see\n[Force a geography](/ad-manager/mobile-ads-sdk/ios/privacy#force_a_geography).\n| **Note:** `UMPDebugGeographyRegulatedUSState` is only available in UMP version 2.7.0 or higher."]]