From 0a3aff189b2e3be45165059aaedf23baaa079166 Mon Sep 17 00:00:00 2001 From: Eschenko_D Date: Tue, 7 Sep 2021 11:09:28 +0300 Subject: [PATCH] Release 1.2.7 --- CHANGELOG.md | 4 ++ README.md | 2 +- Runtime/ConsentClient.cs | 100 ++++++++++++++------------------- Runtime/MediationSettingsUI.cs | 7 ++- Runtime/UserConsent.cs | 2 +- package.json | 4 +- 6 files changed, 53 insertions(+), 66 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c3c38e..2ffb99c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Clever Ads Solutions Unity Plugin Change Log +## [1.2.7] - 2021-09-07 +### Dependencies +- CleverAdsSolutions - [2.5.2](https://github.com/cleveradssolutions/CAS-Unity/releases) + ## [1.2.6] - 2021-07-07 ### Bug Fixes - [iOS] Fixed response of AppTrackingTransparency from wrong thread. diff --git a/README.md b/README.md index 5c81593..6426cc5 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Modify `Packages/manifest.json` to the following form: } ], "dependencies": { -"com.cleversolutions.ads.consent.unity": "https://github.com/cleveradssolutions/CAS-Unity-Consent.git#1.2.6" +"com.cleversolutions.ads.consent.unity": "https://github.com/cleveradssolutions/CAS-Unity-Consent.git#1.2.7" } } ``` diff --git a/Runtime/ConsentClient.cs b/Runtime/ConsentClient.cs index 00fe363..1eaeb4e 100644 --- a/Runtime/ConsentClient.cs +++ b/Runtime/ConsentClient.cs @@ -77,13 +77,18 @@ internal static void SetMediationExtras() if (active.Length != consent.Length) return; var result = new Dictionary(); + var netTags = GetNetworkTags(); for (int i = 0; i < consent.Length; i++) { if (consent[i] != '-') { - var tag = GetNetworkTag( active[i] ); - result[tag + "_gdpr"] = consent[i].ToString(); - //result[tag + "_ccpa"] = consent[i].ToString(); + var tagI = ( int )active[i]; + if (tagI < netTags.Length) + { + var tag = netTags[tagI]; + result[tag + "_gdpr"] = consent[i].ToString(); + //result[tag + "_ccpa"] = consent[i].ToString(); + } } } if (result.Count > 0) @@ -131,62 +136,6 @@ internal static UserConsentUI Request( ConsentRequestParameters parameters ) return instance; } - private static string GetNetworkTag( AdNetwork network ) - { - switch (network) - { - case AdNetwork.GoogleAds: - return "AM"; - case AdNetwork.Vungle: - return "V"; - case AdNetwork.Kidoz: - return "K"; - case AdNetwork.Chartboost: - return "CB"; - case AdNetwork.UnityAds: - return "U"; - case AdNetwork.AppLovin: - return "AL"; - case AdNetwork.SuperAwesome: - return "SuA"; - case AdNetwork.StartApp: - return "StA"; - case AdNetwork.AdColony: - return "AC"; - case AdNetwork.FacebookAN: - return "FB"; - case AdNetwork.InMobi: - return "IM"; - case AdNetwork.MobFox: - return "MF"; - case AdNetwork.MyTarget: - return "MT"; - case AdNetwork.CrossPromotion: - return "P"; - case AdNetwork.IronSource: - return "IS"; - case AdNetwork.YandexAds: - return "Ya"; - case AdNetwork.OwnVAST: - return "Own"; - case AdNetwork.AmazonAds: - return "AZ"; - case AdNetwork.Verizon: - return "VZ"; - case AdNetwork.MoPub: - return "MP"; - case AdNetwork.Tapjoy: - return "TJ"; - case AdNetwork.Fyber: - case AdNetwork.FairBid: - return "Fy"; - case AdNetwork.Mintegral: - return "MB"; - default: - return string.Empty; - } - } - public static string GetTypedText( this ConsentRequestParameters.TypedText[] source, int id ) { if (source.Length == 0) @@ -198,5 +147,38 @@ public static string GetTypedText( this ConsentRequestParameters.TypedText[] sou } return source[0].text; } + + public static string[] GetNetworkTags() + { + return new string[] + { + "AM", + "V", + "K", + "CB", + "U", + "AL", + "SuA", + "StA", + "AC", + "FB", + "IM", + "MF", + "MT", + "P", + "IS", + "Ya", + string.Empty, //VAST + string.Empty, //MAX + "Sm", + "MP", + "TJ", + string.Empty, //Fyber + "Fy", + "MB", + "Pa", + "HMX" + }; + } } } \ No newline at end of file diff --git a/Runtime/MediationSettingsUI.cs b/Runtime/MediationSettingsUI.cs index 698ff76..46a9daa 100644 --- a/Runtime/MediationSettingsUI.cs +++ b/Runtime/MediationSettingsUI.cs @@ -44,13 +44,14 @@ private IEnumerator Start() "https://developers.ironsrc.com/ironsource-mobile/air/ironsource-mobile-privacy-policy/", "https://yandex.com/legal/mobileads_sdk_agreement/", null, - "https://advertising.amazon.com/legal/privacy-notice", - "https://www.verizonmedia.com/policies/us/en/verizonmedia/privacy/", + null, + null, "https://www.mopub.com/en/legal/privacy", "https://www.tapjoy.com/legal/players/privacy-policy/", null, "https://www.fyber.com/privacy-policy/", - "https://www.mintegral.com/en/privacy/" + "https://www.mintegral.com/en/privacy/", + "https://www.pangleglobal.com/privacy/enduser-en" }; yield return null; diff --git a/Runtime/UserConsent.cs b/Runtime/UserConsent.cs index a647455..ceac1ec 100644 --- a/Runtime/UserConsent.cs +++ b/Runtime/UserConsent.cs @@ -5,7 +5,7 @@ namespace CAS.UserConsent { public static class UserConsent { - public const string version = "1.2.6"; + public const string version = "1.2.7"; /// /// User latest consent status values. diff --git a/package.json b/package.json index a114c18..a2fe6b2 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,11 @@ { "name": "com.cleversolutions.ads.consent.unity", - "version": "1.2.6", + "version": "1.2.7", "displayName": "CleverAdsSolutions Consent", "description": "Clever Ads Solutions User consent Unity plugin.", "unity": "2017.4", "dependencies": { - "com.cleversolutions.ads.unity": "2.2.2" + "com.cleversolutions.ads.unity": "2.5.2" }, "author": { "name": "CleverAdsSolutions",