Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 5.1.1 #328

Merged
merged 3 commits into from
Mar 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions Assets/Adjust/Native/iOS/AdjustUnity.mm
Original file line number Diff line number Diff line change
Expand Up @@ -372,12 +372,13 @@ void _AdjustGetAttribution(AdjustDelegateAttributionGetter callback) {
addValueOrEmpty(dictionary, @"costType", attribution.costType);
addValueOrEmpty(dictionary, @"costAmount", attribution.costAmount);
addValueOrEmpty(dictionary, @"costCurrency", attribution.costCurrency);

NSData *jsonData = [NSJSONSerialization dataWithJSONObject:attribution.jsonResponse
options:0
error:nil];
NSString *strJsonResponse = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
addValueOrEmpty(dictionary, @"jsonResponse", strJsonResponse);
if (attribution.jsonResponse != nil) {
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:attribution.jsonResponse
options:0
error:nil];
NSString *strJsonResponse = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
addValueOrEmpty(dictionary, @"jsonResponse", strJsonResponse);
}

NSData *dataAttribution = [NSJSONSerialization dataWithJSONObject:dictionary
options:0
Expand Down
16 changes: 9 additions & 7 deletions Assets/Adjust/Native/iOS/AdjustUnityDelegate.mm
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,15 @@ - (void)adjustAttributionChangedWannabe:(ADJAttribution *)attribution {
forKey:@"costCurrency"
toDictionary:dictionary];

NSData *jsonData = [NSJSONSerialization dataWithJSONObject:attribution.jsonResponse
options:0
error:nil];
NSString *strJsonResponse = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
[self addValueOrEmpty:strJsonResponse
forKey:@"jsonResponse"
toDictionary:dictionary];
if (attribution.jsonResponse != nil) {
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:attribution.jsonResponse
options:0
error:nil];
NSString *strJsonResponse = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
[self addValueOrEmpty:strJsonResponse
forKey:@"jsonResponse"
toDictionary:dictionary];
}

NSData *dataAttribution = [NSJSONSerialization dataWithJSONObject:dictionary
options:0
Expand Down
2 changes: 1 addition & 1 deletion Assets/Adjust/Scripts/AdjustAndroid.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace AdjustSdk
#if UNITY_ANDROID
public class AdjustAndroid
{
private const string sdkPrefix = "unity5.1.0";
private const string sdkPrefix = "unity5.1.1";
private static bool isDeferredDeeplinkOpeningEnabled = true;
private static AndroidJavaClass ajcAdjust = new AndroidJavaClass("com.adjust.sdk.Adjust");
private static AndroidJavaObject ajoCurrentActivity = new AndroidJavaClass("com.unity3d.player.UnityPlayer").GetStatic<AndroidJavaObject>("currentActivity");
Expand Down
2 changes: 1 addition & 1 deletion Assets/Adjust/Scripts/AdjustiOS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace AdjustSdk
#if UNITY_IOS
public class AdjustiOS
{
private const string sdkPrefix = "unity5.1.0";
private const string sdkPrefix = "unity5.1.1";

// app callbacks as method parameters
private static List<Action<bool>> appIsEnabledGetterCallbacks;
Expand Down
2 changes: 1 addition & 1 deletion Assets/Adjust/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "com.adjust.sdk",
"version": "5.1.0",
"version": "5.1.1",
"unity": "2019.4",
"displayName": "Adjust",
"license": "MIT",
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
### Version 5.1.1 (March 5th 2025)
#### Fixed
- Added missing null checks for native `jsonResponse` fields (https://github.com/adjust/flutter_sdk/pull/160).

#### Native SDKs
- [iOS@v5.1.1][ios_sdk_v5.1.1]
- [Android@v5.1.0][android_sdk_v5.1.0]

---

### Version 5.1.0 (28th February 2025)
#### Added
- Added `JsonResponse` to `AdjustAttribution` where every key-value pair sent by the backend as part of the attribution response can be found.
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.1.0
5.1.1