MAS SDK Privacy Dialog
The MAS SDK provides a built-in privacy compliance dialog that automatically handles user age collection and consent management for COPPA, GDPR, and CCPA compliance. This dialog streamlines the legal compliance process by presenting users with an appropriate interface to collect necessary privacy information.

Enable SDK Privacy Dialog
To enable the SDK privacy dialog, call the following method before initializing the SDK:
- Unity
- Java
- Kotlin
- Swift
- Objective-C
Yodo1AdBuildConfig config = new Yodo1AdBuildConfig().enableUserPrivacyDialog(true);
// Update the agreement link
config = config.userAgreementUrl("Your user agreement url");
// Update the privacy link
config = config.privacyPolicyUrl("Your privacy policy url");
Yodo1U3dMas.SetAdBuildConfig(config);
Yodo1MasAdBuildConfig.Builder configBuilder = new Yodo1MasAdBuildConfig.Builder().enableUserPrivacyDialog(true)
// Update the agreement link
configBuilder = configBuilder.userAgreementUrl("Your user agreement url")
// Update the privacy link
configBuilder = configBuilder.privacyPolicyUrl("Your privacy policy url")
Yodo1Mas.getInstance().setAdBuildConfig(configBuilder.build())
val configBuilder = Yodo1MasAdBuildConfig.Builder().enableUserPrivacyDialog(true)
// Update the agreement link
configBuilder = configBuilder.userAgreementUrl("Your user agreement url")
// Update the privacy link
configBuilder = configBuilder.privacyPolicyUrl("Your privacy policy url")
Yodo1Mas.getInstance().setAdBuildConfig(configBuilder.build())
var config = Yodo1MasAdBuildConfig.instance()
config.enableUserPrivacyDialog = true
// Update the agreement link
config.userAgreementUrl = "Your user agreement url"
// Update the privacy link
config.privacyPolicyUrl = "Your privacy policy url"
Yodo1Mas.sharedInstance().setAdBuildConfig(config)
Yodo1MasAdBuildConfig *config = [Yodo1MasAdBuildConfig instance];
config.enableUserPrivacyDialog = YES;
// Update the agreement link
config.userAgreementUrl = @"Your user agreement url";
// Update the privacy link
config.privacyPolicyUrl = @"Your privacy policy url";
[[Yodo1Mas sharedInstance] setAdBuildConfig:config];
Customize Dialog Appearance
The privacy dialog consists of three customizable sections:
- Title section - Header area with the main title
- Content section - Main body with privacy information
- Button section - Action buttons for user interaction

You can customize the background and text colors for each section:
- Unity
- Java
- Kotlin
- Swift
- Objective-C
Yodo1MasUserPrivacyConfig userPrivacyConfig = new Yodo1MasUserPrivacyConfig()
.titleBackgroundColor(Color.green)
.titleTextColor(Color.blue)
.contentBackgroundColor(Color.black)
.contentTextColor(Color.white)
.buttonBackgroundColor(Color.red)
.buttonTextColor(Color.green);
Yodo1AdBuildConfig config = new Yodo1AdBuildConfig()
.enableUserPrivacyDialog(true)
.userPrivacyConfig(userPrivacyConfig);
Yodo1U3dMas.SetAdBuildConfig(config);
Yodo1MasUserPrivacyConfig agePopBuildConfig = new Yodo1MasUserPrivacyConfig.Builder()
.titleBackgroundColor(Color.BLUE)
.titleTextColor(Color.WHITE)
.contentBackgroundColor(Color.WHITE)
.contentTextColor(Color.BLACK)
.buttonBackgroundColor(Color.BLUE)
.buttonTextColor(Color.WHITE)
.build();
Yodo1MasAdBuildConfig config = new Yodo1MasAdBuildConfig.Builder()
.enableUserPrivacyDialog(true)
.userPrivacyConfig(agePopBuildConfig)
.build();
Yodo1Mas.getInstance().setAdBuildConfig(config);
val agePopBuildConfig = Yodo1MasUserPrivacyConfig.Builder()
.titleBackgroundColor(Color.BLUE)
.titleTextColor(Color.WHITE)
.contentBackgroundColor(Color.WHITE)
.contentTextColor(Color.BLACK)
.buttonBackgroundColor(Color.BLUE)
.buttonTextColor(Color.WHITE)
.build()
val config = Yodo1MasAdBuildConfig.Builder()
.enableUserPrivacyDialog(true)
.userPrivacyConfig(agePopBuildConfig)
.build()
Yodo1Mas.getInstance().setAdBuildConfig(config)
let privacyConfig = Yodo1MasUserPrivacyConfig.instance()
privacyConfig.titleBackgroundColor = UIColor.blue
privacyConfig.titleTextColor = UIColor.white
privacyConfig.contentBackgroundColor = UIColor.white
privacyConfig.contentTextColor = UIColor.darkText
privacyConfig.buttonBackgroundColor = UIColor.blue
privacyConfig.buttonTextColor = UIColor.white
let config = Yodo1MasAdBuildConfig.instance()
config.enableUserPrivacyDialog = true
config.userPrivacyConfig = privacyConfig
Yodo1Mas.sharedInstance().setAdBuildConfig(config)
Yodo1MasUserPrivacyConfig *privacyConfig = [Yodo1MasUserPrivacyConfig instance];
privacyConfig.titleBackgroundColor = UIColor.blueColor;
privacyConfig.titleTextColor = UIColor.whiteColor;
privacyConfig.contentBackgroundColor = UIColor.whiteColor;
privacyConfig.contentTextColor = UIColor.darkTextColor;
privacyConfig.buttonBackgroundColor = UIColor.blueColor;
privacyConfig.buttonTextColor = [UIColor whiteColor];
Yodo1MasAdBuildConfig *config = [Yodo1MasAdBuildConfig instance];
config.enableUserPrivacyDialog = YES;
config.userPrivacyConfig = privacyConfig;
[[Yodo1Mas sharedInstance] setAdBuildConfig:config];
Retrieve User Data
After the user completes the privacy dialog, you can access their age and ATT (App Tracking Transparency) status:
- Unity
- Java
- Kotlin
- Swift
- Objective-C
int age = Yodo1U3dMas.GetUserAge();
int attStatus = Yodo1U3dMas.GetAttrackingStatus();
switch(attStatus) {
case Yodo1U3dAttrackingStatus.NotDetermined: break;
case Yodo1U3dAttrackingStatus.Restricted: break;
case Yodo1U3dAttrackingStatus.Denied: break;
case Yodo1U3dAttrackingStatus.Authorized: break;
case Yodo1U3dAttrackingStatus.SystemLow: break; // iOS version below 14
}
int age = Yodo1Mas.getInstance().getUserAge();
val age = Yodo1Mas.getInstance().getUserAge()
let age = Yodo1Mas.sharedInstance().userAge
let attStatus = Yodo1Mas.sharedInstance().attrackingStatus
switch(attStatus) {
case .notDetermined: break;
case .restricted: break;
case .denied: break;
case .authorized: break;
case .systemLow: break; // iOS version below 14
}
NSInteger age = [Yodo1Mas sharedInstance].userAge;
Yodo1MasATTrackingStatus attStatus = [Yodo1Mas sharedInstance].attrackingStatus;
switch(attStatus) {
case Yodo1MasATTrackingStatusNotDetermined: break;
case Yodo1MasATTrackingStatusRestricted: break;
case Yodo1MasATTrackingStatusDenied: break;
case Yodo1MasATTrackingStatusAuthorized: break;
case Yodo1MasATTrackingStatusSystemLow: break; // iOS version below 14
}
How It Works
The MAS SDK privacy dialog automatically handles compliance requirements:
- COPPA: Sets to
falseif user age ≥ 13, otherwisetrue - GDPR: Sets to
trueif user age ≥ 16 and consents to data collection, otherwisefalse - CCPA: Sets to
falseif user consents to data collection, otherwisetrue
The dialog ensures your app meets privacy regulations without requiring manual implementation of individual compliance frameworks.