Skip to content

Commit c2f47e4

Browse files
authored
Merge pull request #335 from adjust/v540
Version 5.4.0
2 parents 6eaaa2b + 515b8b2 commit c2f47e4

File tree

13 files changed

+275
-194
lines changed

13 files changed

+275
-194
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<dependencies>
33
<androidPackages>
4-
<androidPackage spec="com.adjust.sdk:adjust-android:5.3.0">
4+
<androidPackage spec="com.adjust.sdk:adjust-android:5.4.0">
55
</androidPackage>
66
<androidPackage spec="com.android.installreferrer:installreferrer:2.2">
77
</androidPackage>
88
</androidPackages>
99
<iosPods>
10-
<iosPod name="Adjust" version="5.3.0" minTargetSdk="12.0">
10+
<iosPod name="Adjust" version="5.4.0" minTargetSdk="12.0">
1111
</iosPod>
1212
</iosPods>
1313
</dependencies>

Assets/Adjust/Native/iOS/AdjustUnity.mm

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ void _AdjustInitSdk(
8888
const char* defaultTracker,
8989
const char* externalDeviceId,
9090
const char* jsonUrlStrategyDomains,
91+
const char* storeName,
92+
const char* storeAppId,
9193
int allowSuppressLogLevel,
9294
int logLevel,
9395
int attConsentWaitingInterval,
@@ -117,6 +119,8 @@ void _AdjustInitSdk(
117119
NSString *strSdkPrefix = isStringValid(sdkPrefix) == true ? [NSString stringWithUTF8String:sdkPrefix] : nil;
118120
NSString *strDefaultTracker = isStringValid(defaultTracker) == true ? [NSString stringWithUTF8String:defaultTracker] : nil;
119121
NSString *strExternalDeviceId = isStringValid(externalDeviceId) == true ? [NSString stringWithUTF8String:externalDeviceId] : nil;
122+
NSString *strStoreName = isStringValid(storeName) == true ? [NSString stringWithUTF8String:storeName] : nil;
123+
NSString *strStoreAppId = isStringValid(storeAppId) == true ? [NSString stringWithUTF8String:storeAppId] : nil;
120124

121125
ADJConfig *adjustConfig;
122126

@@ -256,6 +260,15 @@ void _AdjustInitSdk(
256260
}
257261
}
258262

263+
// custom store
264+
if (strStoreName != nil) {
265+
ADJStoreInfo *storeInfo = [[ADJStoreInfo alloc] initWithStoreName:strStoreName];
266+
if (strStoreAppId != nil) {
267+
[storeInfo setStoreAppId:strStoreAppId];
268+
}
269+
[adjustConfig setStoreInfo:storeInfo];
270+
}
271+
259272
// initialize the SDK
260273
[Adjust initSdk:adjustConfig];
261274
}

Assets/Adjust/Scripts/AdjustAndroid.cs

Lines changed: 190 additions & 185 deletions
Large diffs are not rendered by default.

Assets/Adjust/Scripts/AdjustConfig.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ public class AdjustConfig
2222
public List<string> UrlStrategyDomains { get; private set; }
2323
public AdjustLogLevel? LogLevel { get; set; }
2424
public AdjustEnvironment Environment { get; private set; }
25+
public AdjustStoreInfo StoreInfo { get; set; }
2526
public Action<AdjustAttribution> AttributionChangedDelegate { get; set; }
2627
public Action<AdjustEventSuccess> EventSuccessDelegate { get; set; }
2728
public Action<AdjustEventFailure> EventFailureDelegate { get; set; }
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
using System;
2+
3+
namespace AdjustSdk
4+
{
5+
public class AdjustStoreInfo
6+
{
7+
public string StoreName { get; private set; }
8+
public string StoreAppId { get; set; }
9+
10+
public AdjustStoreInfo(string storeName)
11+
{
12+
this.StoreName = storeName;
13+
}
14+
}
15+
}

Assets/Adjust/Scripts/AdjustStoreInfo.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/Adjust/Scripts/AdjustiOS.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace AdjustSdk
88
#if UNITY_IOS
99
public class AdjustiOS
1010
{
11-
private const string sdkPrefix = "unity5.3.0";
11+
private const string sdkPrefix = "unity5.4.0";
1212

1313
// app callbacks as method parameters
1414
private static List<Action<bool>> appIsEnabledGetterCallbacks;
@@ -49,6 +49,8 @@ private static extern void _AdjustInitSdk(
4949
string defaultTracker,
5050
string externalDeviceId,
5151
string jsonUrlStrategyDomains,
52+
string storeName,
53+
string storeAppId,
5254
int allowSuppressLogLevel,
5355
int logLevel,
5456
int attConsentWaitingInterval,
@@ -270,6 +272,13 @@ public static void InitSdk(AdjustConfig adjustConfig)
270272
string externalDeviceId = adjustConfig.ExternalDeviceId != null ? adjustConfig.ExternalDeviceId : "ADJ_INVALID";
271273
string stringJsonUrlStrategyDomains = AdjustUtils.ConvertReadOnlyCollectionToJson(
272274
adjustConfig.UrlStrategyDomains != null ? adjustConfig.UrlStrategyDomains.AsReadOnly() : null);
275+
string storeName = "ADJ_INVALID";
276+
string storeAppId = "ADJ_INVALID";
277+
if (adjustConfig.StoreInfo != null)
278+
{
279+
storeName = adjustConfig.StoreInfo.StoreName != null ? adjustConfig.StoreInfo.StoreName : "ADJ_INVALID";
280+
storeAppId = adjustConfig.StoreInfo.StoreAppId != null ? adjustConfig.StoreInfo.StoreAppId : "ADJ_INVALID";
281+
}
273282
int attConsentWaitingInterval = AdjustUtils.ConvertInt(adjustConfig.AttConsentWaitingInterval);
274283
int eventDeduplicationIdsMaxSize = AdjustUtils.ConvertInt(adjustConfig.EventDeduplicationIdsMaxSize);
275284
int logLevel = AdjustUtils.ConvertLogLevel(adjustConfig.LogLevel);
@@ -302,6 +311,8 @@ public static void InitSdk(AdjustConfig adjustConfig)
302311
defaultTracker,
303312
externalDeviceId,
304313
stringJsonUrlStrategyDomains,
314+
storeName,
315+
storeAppId,
305316
allowSuppressLogLevel,
306317
logLevel,
307318
attConsentWaitingInterval,

Assets/Adjust/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "com.adjust.sdk",
3-
"version": "5.3.0",
3+
"version": "5.4.0",
44
"unity": "2019.4",
55
"displayName": "Adjust",
66
"license": "MIT",

Assets/Test/Scripts/CommandExecutor.cs

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,17 @@ private void Config()
358358
adjustConfig.EventDeduplicationIdsMaxSize = eventDeduplicationIdsMaxSize;
359359
}
360360

361+
if (_command.ContainsParameter("storeName"))
362+
{
363+
var storeName = _command.GetFirstParameterValue("storeName");
364+
AdjustStoreInfo storeInfo = new AdjustStoreInfo(storeName);
365+
if (_command.ContainsParameter("storeAppId"))
366+
{
367+
storeInfo.StoreAppId = _command.GetFirstParameterValue("storeAppId");
368+
}
369+
adjustConfig.StoreInfo = storeInfo;
370+
}
371+
361372
if (_command.ContainsParameter("deferredDeeplinkCallback"))
362373
{
363374
bool launchDeferredDeeplink = _command.GetFirstParameterValue("deferredDeeplinkCallback") == "true";
@@ -393,7 +404,8 @@ private void Config()
393404
{
394405
updatedJsonResponse = new Dictionary<string, object>(attribution.JsonResponse);
395406
updatedJsonResponse.Remove("fb_install_referrer");
396-
if (updatedJsonResponse.TryGetValue("cost_amount", out var costAmount) && costAmount is IConvertible)
407+
object costAmount;
408+
if (updatedJsonResponse.TryGetValue("cost_amount", out costAmount) && costAmount is IConvertible)
397409
{
398410
updatedJsonResponse["cost_amount"] = string.Format("{0:0.00}", System.Convert.ToDouble(costAmount));
399411
}
@@ -1012,7 +1024,8 @@ private void AttributionGetter()
10121024
{
10131025
updatedJsonResponse = new Dictionary<string, object>(attribution.JsonResponse);
10141026
updatedJsonResponse.Remove("fb_install_referrer");
1015-
if (updatedJsonResponse.TryGetValue("cost_amount", out var costAmount) && costAmount is IConvertible)
1027+
object costAmount;
1028+
if (updatedJsonResponse.TryGetValue("cost_amount", out costAmount) && costAmount is IConvertible)
10161029
{
10171030
updatedJsonResponse["cost_amount"] = string.Format("{0:0.00}", System.Convert.ToDouble(costAmount));
10181031
}

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
### Version 5.4.0 (May 19th 2025)
2+
#### Added
3+
- Added support for configuring store information via the `AdjustStoreInfo` object. You can now specify the store name and store app ID assigning `StoreInfo` property on your `AdjustConfig` instance. This enables the SDK to record the intended app store source during initialization.
4+
5+
#### Native SDKs
6+
- [[email protected]][ios_sdk_v5.4.0]
7+
- [[email protected]][android_sdk_v5.4.0]
8+
9+
---
10+
111
### Version 5.3.0 (April 17th 2025)
212
#### Added
313
- Added ability to initialize the SDK for the first session in delayed mode. You can start the SDK in the delayed mode by setting the `IsFirstSessionDelayEnabled` property on your `AdjustConfig` instance to `true`. To end the delay, make sure to call `EndFirstSessionDelay` method of `Adjust` instance. For more details about this feature, refer to the [official documentation](https://dev.adjust.com/en/sdk/unity/features/first-session-delay).
@@ -1428,6 +1438,7 @@ Kudos to [Ivan](https://github.com/MatkovIvan) and [Evgeny](https://github.com/e
14281438
[ios_sdk_v5.1.0]: https://github.com/adjust/ios_sdk/tree/v5.1.0
14291439
[ios_sdk_v5.1.1]: https://github.com/adjust/ios_sdk/tree/v5.1.1
14301440
[ios_sdk_v5.3.0]: https://github.com/adjust/ios_sdk/tree/v5.3.0
1441+
[ios_sdk_v5.4.0]: https://github.com/adjust/ios_sdk/tree/v5.4.0
14311442

14321443
[android_sdk_v3.5.0]: https://github.com/adjust/android_sdk/tree/v3.5.0
14331444
[android_sdk_v4.1.0]: https://github.com/adjust/android_sdk/tree/v4.1.0
@@ -1485,6 +1496,7 @@ Kudos to [Ivan](https://github.com/MatkovIvan) and [Evgeny](https://github.com/e
14851496
[android_sdk_v5.0.2]: https://github.com/adjust/android_sdk/tree/v5.0.2
14861497
[android_sdk_v5.1.0]: https://github.com/adjust/android_sdk/tree/v5.1.0
14871498
[android_sdk_v5.3.0]: https://github.com/adjust/android_sdk/tree/v5.3.0
1499+
[android_sdk_v5.4.0]: https://github.com/adjust/android_sdk/tree/v5.4.0
14881500

14891501
[windows_sdk_v4.12.0]: https://github.com/adjust/windows_sdk/tree/v4.12.0
14901502
[windows_sdk_v4.13.0]: https://github.com/adjust/windows_sdk/tree/v4.13.0

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.3.0
1+
5.4.0

ext/android/sdk

Submodule sdk updated 26 files

0 commit comments

Comments
 (0)