Yandex Mobile Ads
Loading...
Searching...
No Matches
MobileAds.cs
Go to the documentation of this file.
1/*
2 * This file is a part of the Yandex Advertising Network
3 *
4 * Version for iOS (C) 2023 YANDEX
5 *
6 * You may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at https://legal.yandex.com/partner_ch/
8 */
9
10using System;
11using YandexMobileAds.Common;
12using YandexMobileAds.Platforms;
13
14namespace YandexMobileAds
15{
19 public static class MobileAds
20 {
27 public static void SetUserConsent(bool consent)
28 {
29 IMobileAdsClient mobileAds = YandexMobileAdsClientFactory.CreateMobileAdsClient();
30 mobileAds.SetUserConsent(consent);
31 }
32
37 public static void SetLocationConsent(bool consent)
38 {
39 IMobileAdsClient mobileAds = YandexMobileAdsClientFactory.CreateMobileAdsClient();
40 mobileAds.SetLocationConsent(consent);
41 }
42
47 public static void SetAgeRestrictedUser(bool ageRestrictedUser)
48 {
49 IMobileAdsClient mobileAds = YandexMobileAdsClientFactory.CreateMobileAdsClient();
50 mobileAds.SetAgeRestrictedUser(ageRestrictedUser);
51 }
52 }
53}
A class allows you to set general SDK settings.
Definition MobileAds.cs:20
static void SetUserConsent(bool consent)
Sets a value that indicates whether a user from the GDPR region permits the collection of personal da...
Definition MobileAds.cs:27
static void SetLocationConsent(bool consent)
The SDK automatically collects location data if the user allowed the app to track the location....
Definition MobileAds.cs:37
static void SetAgeRestrictedUser(bool ageRestrictedUser)
The SDK automatically collects personal data if the user didn't restrict them. By default restriction...
Definition MobileAds.cs:47