Skip to content
This repository has been archived by the owner on Jul 25, 2023. It is now read-only.

Commit

Permalink
Release 1.2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
Str4tos committed Sep 7, 2021
1 parent 6c02ff6 commit 0a3aff1
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 66 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
```
Expand Down
100 changes: 41 additions & 59 deletions Runtime/ConsentClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,18 @@ internal static void SetMediationExtras()
if (active.Length != consent.Length)
return;
var result = new Dictionary<string, string>();
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)
Expand Down Expand Up @@ -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)
Expand All @@ -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"
};
}
}
}
7 changes: 4 additions & 3 deletions Runtime/MediationSettingsUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion Runtime/UserConsent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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";

/// <summary>
/// User latest consent status values.
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 0a3aff1

Please sign in to comment.