Skip to content

Commit 44656e4

Browse files
authored
Merge pull request #199 from adjust/v4241
Version 4.24.1
2 parents 74cb2b9 + b64b217 commit 44656e4

File tree

7 files changed

+34
-7
lines changed

7 files changed

+34
-7
lines changed

Assets/Adjust/Android/AdjustAndroid.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace com.adjust.sdk
88
#if UNITY_ANDROID
99
public class AdjustAndroid
1010
{
11-
private const string sdkPrefix = "unity4.24.0";
11+
private const string sdkPrefix = "unity4.24.1";
1212
private static bool launchDeferredDeeplink = true;
1313
private static AndroidJavaClass ajcAdjust = new AndroidJavaClass("com.adjust.sdk.Adjust");
1414
private static AndroidJavaObject ajoCurrentActivity = new AndroidJavaClass("com.unity3d.player.UnityPlayer").GetStatic<AndroidJavaObject>("currentActivity");

Assets/Adjust/Unity/AdjustAttribution.cs

+18-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,16 @@ public AdjustAttribution(string jsonString)
3636
clickLabel = AdjustUtils.GetJsonString(jsonNode, AdjustUtils.KeyClickLabel);
3737
adid = AdjustUtils.GetJsonString(jsonNode, AdjustUtils.KeyAdid);
3838
costType = AdjustUtils.GetJsonString(jsonNode, AdjustUtils.KeyCostType);
39-
costAmount = double.Parse(AdjustUtils.GetJsonString(jsonNode, AdjustUtils.KeyCostAmount),
39+
try
40+
{
41+
costAmount = double.Parse(AdjustUtils.GetJsonString(jsonNode, AdjustUtils.KeyCostAmount),
4042
System.Globalization.CultureInfo.InvariantCulture);
43+
}
44+
catch (Exception)
45+
{
46+
// attribution response doesn't contain cost amount attached
47+
// value will default to null
48+
}
4149
costCurrency = AdjustUtils.GetJsonString(jsonNode, AdjustUtils.KeyCostCurrency);
4250
}
4351

@@ -57,8 +65,16 @@ public AdjustAttribution(Dictionary<string, string> dicAttributionData)
5765
clickLabel = AdjustUtils.TryGetValue(dicAttributionData, AdjustUtils.KeyClickLabel);
5866
adid = AdjustUtils.TryGetValue(dicAttributionData, AdjustUtils.KeyAdid);
5967
costType = AdjustUtils.TryGetValue(dicAttributionData, AdjustUtils.KeyCostType);
60-
costAmount = double.Parse(AdjustUtils.TryGetValue(dicAttributionData, AdjustUtils.KeyCostAmount),
68+
try
69+
{
70+
costAmount = double.Parse(AdjustUtils.TryGetValue(dicAttributionData, AdjustUtils.KeyCostAmount),
6171
System.Globalization.CultureInfo.InvariantCulture);
72+
}
73+
catch (Exception)
74+
{
75+
// attribution response doesn't contain cost amount attached
76+
// value will default to null
77+
}
6278
costCurrency = AdjustUtils.TryGetValue(dicAttributionData, AdjustUtils.KeyCostCurrency);
6379
}
6480
}

Assets/Adjust/Windows/AdjustWindows.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ namespace com.adjust.sdk
1717
{
1818
public class AdjustWindows
1919
{
20-
private const string sdkPrefix = "unity4.24.0";
20+
private const string sdkPrefix = "unity4.24.1";
2121
private static bool appLaunched = false;
2222

2323
public static void Start(AdjustConfig adjustConfig)

Assets/Adjust/iOS/AdjustiOS.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace com.adjust.sdk
88
#if UNITY_IOS
99
public class AdjustiOS
1010
{
11-
private const string sdkPrefix = "unity4.24.0";
11+
private const string sdkPrefix = "unity4.24.1";
1212

1313
[DllImport("__Internal")]
1414
private static extern void _AdjustLaunchApp(

CHANGELOG.md

+11
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
### Version 4.24.1 (24th December 2020)
2+
#### Fixed
3+
- Fixed handling of native `null` values for cost amount.
4+
5+
#### Native SDKs
6+
- [[email protected]][ios_sdk_v4.24.0]
7+
- [[email protected]][android_sdk_v4.25.0]
8+
- [[email protected]][windows_sdk_v4.17.0]
9+
10+
---
11+
112
### Version 4.24.0 (11th December 2020)
213
#### Added
314
- Added possibility to get cost data information in attribution callback.

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.24.0
1+
4.24.1

doc/english/migration/migrate.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Migrate your Adjust SDK for Unity3d to 4.24.0 from 3.4.4
1+
## Migrate your Adjust SDK for Unity3d to 4.24.1 from 3.4.4
22

33
### Migration procedure
44

0 commit comments

Comments
 (0)