Skip to content

Commit 74e2d83

Browse files
authored
Merge pull request #235 from adjust/v4372
Version 4.37.2
2 parents 1ac1abc + 53234cd commit 74e2d83

File tree

23 files changed

+926
-727
lines changed

23 files changed

+926
-727
lines changed

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
### Version 4.37.2 (21st March 2024)
2+
#### Fixed
3+
- Fixed occasional crashes caused by not synchronized access to cached IDFA value (https://github.com/adjust/ios_sdk/issues/696).
4+
5+
#### Changed
6+
- Added tracking of `third_party_sharing` and `measurement_consent` packages if invoked before SDK initialization in subsequent SDK initializations.
7+
8+
#### Native SDKs
9+
- [[email protected]][ios_sdk_v4.37.2]
10+
- [[email protected]][android_sdk_v4.38.2]
11+
12+
---
13+
114
### Version 4.37.1 (30th January 2024)
215
#### Fixed
316
- Marked all Android method parameters as `final` to address compilation errors when trying to access a callback inside of the inner class (https://github.com/adjust/react_native_sdk/issues/226).
@@ -617,6 +630,7 @@
617630
[ios_sdk_v4.35.1]: https://github.com/adjust/ios_sdk/tree/v4.35.1
618631
[ios_sdk_v4.35.2]: https://github.com/adjust/ios_sdk/tree/v4.35.2
619632
[ios_sdk_v4.37.0]: https://github.com/adjust/ios_sdk/tree/v4.37.0
633+
[ios_sdk_v4.37.2]: https://github.com/adjust/ios_sdk/tree/v4.37.2
620634

621635
[android_sdk_v4.10.4]: https://github.com/adjust/android_sdk/tree/v4.10.4
622636
[android_sdk_v4.11.0]: https://github.com/adjust/android_sdk/tree/v4.11.0
@@ -652,3 +666,4 @@
652666
[android_sdk_v4.35.0]: https://github.com/adjust/android_sdk/tree/v4.35.0
653667
[android_sdk_v4.35.1]: https://github.com/adjust/android_sdk/tree/v4.35.1
654668
[android_sdk_v4.38.1]: https://github.com/adjust/android_sdk/tree/v4.38.1
669+
[android_sdk_v4.38.2]: https://github.com/adjust/android_sdk/tree/v4.38.2

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.37.1
1+
4.37.2

android/libs/adjust-android.jar

-119 Bytes
Binary file not shown.

example/ios/Podfile.lock

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PODS:
2-
- Adjust (4.37.0):
3-
- Adjust/Core (= 4.37.0)
4-
- Adjust/Core (4.37.0)
2+
- Adjust (4.37.2):
3+
- Adjust/Core (= 4.37.2)
4+
- Adjust/Core (4.37.2)
55
- boost (1.76.0)
66
- CocoaAsyncSocket (7.6.5)
77
- DoubleConversion (1.1.6)
@@ -287,8 +287,8 @@ PODS:
287287
- React-jsinspector (0.69.4)
288288
- React-logger (0.69.4):
289289
- glog
290-
- react-native-adjust (4.37.1):
291-
- Adjust (= 4.37.0)
290+
- react-native-adjust (4.37.2):
291+
- Adjust (= 4.37.2)
292292
- React-Core
293293
- React-perflogger (0.69.4)
294294
- React-RCTActionSheet (0.69.4):
@@ -508,7 +508,7 @@ EXTERNAL SOURCES:
508508
:path: "../node_modules/react-native/ReactCommon/yoga"
509509

510510
SPEC CHECKSUMS:
511-
Adjust: 86a6935688251ca6cea371f9b284578ccf3d981b
511+
Adjust: a830d963025334aee8a62a7bac87825e297a841e
512512
boost: a7c83b31436843459a1961bfd74b96033dc77234
513513
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
514514
DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54
@@ -541,7 +541,7 @@ SPEC CHECKSUMS:
541541
React-jsiexecutor: a27badbbdbc0ff781813370736a2d1c7261181d4
542542
React-jsinspector: 8a3d3f5dcd23a91e8c80b1bf0e96902cd1dca999
543543
React-logger: 1088859f145b8f6dd0d3ed051a647ef0e3e80fad
544-
react-native-adjust: 0463129823eabe31ff28262295be713ba5f99d2c
544+
react-native-adjust: 9a9d5b7fff8de8209d468ee4bd3fc1bc386d78cd
545545
React-perflogger: cb386fd44c97ec7f8199c04c12b22066b0f2e1e0
546546
React-RCTActionSheet: f803a85e46cf5b4066c2ac5e122447f918e9c6e5
547547
React-RCTAnimation: 19c80fa950ccce7f4db76a2a7f2cf79baae07fc7

example/yarn.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3551,9 +3551,9 @@ invariant@^2.2.4:
35513551
loose-envify "^1.0.0"
35523552

35533553
ip@^1.1.5:
3554-
version "1.1.8"
3555-
resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.8.tgz#ae05948f6b075435ed3307acce04629da8cdbf48"
3556-
integrity sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg==
3554+
version "1.1.9"
3555+
resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.9.tgz#8dfbcc99a754d07f425310b86a99546b1151e396"
3556+
integrity sha512-cyRxvOEpNHNtchU3Ln9KC/auJgup87llfQpQ+t5ghoC/UhL16SWzbueiCsdTnWmqAWl7LadfuwhlqmtOaqMHdQ==
35573557

35583558
is-accessor-descriptor@^1.0.1:
35593559
version "1.0.1"
@@ -5750,10 +5750,10 @@ react-is@^17.0.1:
57505750
integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==
57515751

57525752
react-native-adjust-oaid@../plugins/oaid:
5753-
version "4.37.1"
5753+
version "4.37.2"
57545754

57555755
react-native-adjust@../temp:
5756-
version "4.37.1"
5756+
version "4.37.2"
57575757

57585758
react-native-codegen@^0.69.1:
57595759
version "0.69.2"

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ Adjust.getAmazonAdId = function(callback) {
136136
};
137137

138138
Adjust.getSdkVersion = function(callback) {
139-
module_adjust.getSdkVersion("react-native4.37.1", callback);
139+
module_adjust.getSdkVersion("react-native4.37.2", callback);
140140
};
141141

142142
Adjust.setReferrer = function(referrer) {
@@ -280,7 +280,7 @@ Adjust.onPause = function(testParam) {
280280
// AdjustConfig
281281

282282
var AdjustConfig = function(appToken, environment) {
283-
this.sdkPrefix = "react-native4.37.1";
283+
this.sdkPrefix = "react-native4.37.2";
284284
this.appToken = appToken;
285285
this.environment = environment;
286286
this.logLevel = null;

ios/Adjust/ADJActivityHandler.m

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,6 +1030,28 @@ - (void)processSessionI:(ADJActivityHandler *)selfI {
10301030
[ADJUserDefaults removeDisableThirdPartySharing];
10311031

10321032
return;
1033+
} else {
1034+
// these checks should run after SDK initialization after the first one
1035+
if ([ADJUserDefaults getDisableThirdPartySharing]) {
1036+
[selfI disableThirdPartySharingI:selfI];
1037+
}
1038+
if (selfI.savedPreLaunch.preLaunchAdjustThirdPartySharingArray != nil) {
1039+
for (ADJThirdPartySharing *thirdPartySharing
1040+
in selfI.savedPreLaunch.preLaunchAdjustThirdPartySharingArray)
1041+
{
1042+
[selfI trackThirdPartySharingI:selfI
1043+
thirdPartySharing:thirdPartySharing];
1044+
}
1045+
1046+
selfI.savedPreLaunch.preLaunchAdjustThirdPartySharingArray = nil;
1047+
}
1048+
if (selfI.savedPreLaunch.lastMeasurementConsentTracked != nil) {
1049+
[selfI
1050+
trackMeasurementConsentI:selfI
1051+
enabled:[selfI.savedPreLaunch.lastMeasurementConsentTracked boolValue]];
1052+
1053+
selfI.savedPreLaunch.lastMeasurementConsentTracked = nil;
1054+
}
10331055
}
10341056

10351057
double lastInterval = now - selfI.activityState.lastActivity;

ios/Adjust/ADJPackageBuilder.m

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1385,23 +1385,30 @@ + (void)addIdfaToParameters:(NSMutableDictionary * _Nullable)parameters
13851385
return;
13861386
}
13871387

1388-
// read once && IDFA not cached
1389-
if (adjConfig.readDeviceInfoOnceEnabled && packageParams.idfaCached != nil) {
1390-
[ADJPackageBuilder parameters:parameters setString:packageParams.idfaCached forKey:@"idfa"];
1391-
return;
1392-
}
1388+
__block NSString *idfa = nil;
1389+
[ADJUtil launchSynchronisedWithObject:[ADJPackageBuilder class] block:^{
1390+
// read once && IDFA not cached
1391+
if (adjConfig.readDeviceInfoOnceEnabled && packageParams.idfaCached != nil) {
1392+
idfa = packageParams.idfaCached;
1393+
} else {
1394+
// read IDFA
1395+
idfa = [ADJUtil idfa];
1396+
if (idfa == nil ||
1397+
idfa.length == 0 ||
1398+
[idfa isEqualToString:@"00000000-0000-0000-0000-000000000000"])
1399+
{
1400+
idfa = nil;
1401+
} else {
1402+
// cache IDFA
1403+
packageParams.idfaCached = idfa;
1404+
}
1405+
}
1406+
}];
13931407

1394-
// read IDFA
1395-
NSString *idfa = [ADJUtil idfa];
1396-
if (idfa == nil ||
1397-
idfa.length == 0 ||
1398-
[idfa isEqualToString:@"00000000-0000-0000-0000-000000000000"]) {
1399-
return;
1408+
if (idfa != nil) {
1409+
// add IDFA to payload
1410+
[ADJPackageBuilder parameters:parameters setString:idfa forKey:@"idfa"];
14001411
}
1401-
// cache IDFA
1402-
packageParams.idfaCached = idfa;
1403-
// add IDFA to payload
1404-
[ADJPackageBuilder parameters:parameters setString:idfa forKey:@"idfa"];
14051412
}
14061413

14071414
@end

ios/Adjust/ADJUtil.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
static NSRegularExpression *shortUniversalLinkRegex = nil;
3636
static NSRegularExpression *excludedDeeplinkRegex = nil;
3737

38-
static NSString * const kClientSdk = @"ios4.37.0";
38+
static NSString * const kClientSdk = @"ios4.37.2";
3939
static NSString * const kDeeplinkParam = @"deep_link=";
4040
static NSString * const kSchemeDelimiter = @"://";
4141
static NSString * const kDefaultScheme = @"AdjustUniversalScheme";

ios/Adjust/Adjust.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Adjust.h
33
// Adjust SDK
44
//
5-
// V4.37.0
5+
// V4.37.2
66
// Created by Christian Wellenbrock (@wellle) on 23rd July 2013.
77
// Copyright (c) 2012-2021 Adjust GmbH. All rights reserved.
88
//
@@ -58,6 +58,7 @@ extern NSString * __nonnull const ADJAdRevenueSourceHeliumChartboost;
5858
extern NSString * __nonnull const ADJAdRevenueSourcePublisher;
5959
extern NSString * __nonnull const ADJAdRevenueSourceTopOn;
6060
extern NSString * __nonnull const ADJAdRevenueSourceADX;
61+
extern NSString * __nonnull const ADJAdRevenueSourceTradplus;
6162

6263
/**
6364
* Constants for country app's URL strategies.

ios/Adjust/Adjust.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
NSString * const ADJAdRevenueSourcePublisher = @"publisher_sdk";
3333
NSString * const ADJAdRevenueSourceTopOn = @"topon_sdk";
3434
NSString * const ADJAdRevenueSourceADX = @"adx_sdk";
35+
NSString * const ADJAdRevenueSourceTradplus = @"tradplus_sdk";
3536

3637
NSString * const ADJUrlStrategyIndia = @"UrlStrategyIndia";
3738
NSString * const ADJUrlStrategyChina = @"UrlStrategyChina";

ios/Adjust/include/Adjust.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Adjust.h
33
// Adjust SDK
44
//
5-
// V4.37.0
5+
// V4.37.2
66
// Created by Christian Wellenbrock (@wellle) on 23rd July 2013.
77
// Copyright (c) 2012-2021 Adjust GmbH. All rights reserved.
88
//
@@ -58,6 +58,7 @@ extern NSString * __nonnull const ADJAdRevenueSourceHeliumChartboost;
5858
extern NSString * __nonnull const ADJAdRevenueSourcePublisher;
5959
extern NSString * __nonnull const ADJAdRevenueSourceTopOn;
6060
extern NSString * __nonnull const ADJAdRevenueSourceADX;
61+
extern NSString * __nonnull const ADJAdRevenueSourceTradplus;
6162

6263
/**
6364
* Constants for country app's URL strategies.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "react-native-adjust",
33
"description": "Adjust React Native SDK",
4-
"version": "4.37.1",
4+
"version": "4.37.2",
55
"main": "index.js",
66
"author": "Adjust",
77
"license": "MIT",
Binary file not shown.

plugins/oaid/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "react-native-adjust-oaid",
33
"description": "Adjust React Native OAID plugin",
4-
"version": "4.37.1",
4+
"version": "4.37.2",
55
"main": "index.js",
66
"author": "Adjust",
77
"license": "MIT",

react-native-adjust.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ Pod::Spec.new do |s|
1818
s.preserve_paths = 'LICENSE', 'README.md', 'package.json', 'index.js'
1919
s.source_files = 'ios/*.{h,m}'
2020

21-
s.dependency 'Adjust', '4.37.0'
21+
s.dependency 'Adjust', '4.37.2'
2222
s.dependency 'React-Core'
2323
end

test/app/App.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const App: () => React$Node = () => {
5050
var baseUrl = "";
5151
var gdprUrl = "";
5252
var subscriptionUrl = "";
53-
var ipAddress = "192.168.8.70";
53+
var ipAddress = "192.168.8.64";
5454
if (Platform.OS === "android") {
5555
baseUrl = "https://" + ipAddress + ":8443";
5656
gdprUrl = "https://" + ipAddress + ":8443";

test/app/ios/Podfile.lock

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PODS:
2-
- Adjust (4.37.0):
3-
- Adjust/Core (= 4.37.0)
4-
- Adjust/Core (4.37.0)
2+
- Adjust (4.37.2):
3+
- Adjust/Core (= 4.37.2)
4+
- Adjust/Core (4.37.2)
55
- boost (1.76.0)
66
- CocoaAsyncSocket (7.6.5)
77
- DoubleConversion (1.1.6)
@@ -287,10 +287,10 @@ PODS:
287287
- React-jsinspector (0.69.4)
288288
- React-logger (0.69.4):
289289
- glog
290-
- react-native-adjust (4.37.1):
291-
- Adjust (= 4.37.0)
290+
- react-native-adjust (4.37.2):
291+
- Adjust (= 4.37.2)
292292
- React-Core
293-
- react-native-adjust-test (4.37.1):
293+
- react-native-adjust-test (4.37.2):
294294
- React
295295
- React-perflogger (0.69.4)
296296
- React-RCTActionSheet (0.69.4):
@@ -513,7 +513,7 @@ EXTERNAL SOURCES:
513513
:path: "../node_modules/react-native/ReactCommon/yoga"
514514

515515
SPEC CHECKSUMS:
516-
Adjust: 86a6935688251ca6cea371f9b284578ccf3d981b
516+
Adjust: a830d963025334aee8a62a7bac87825e297a841e
517517
boost: a7c83b31436843459a1961bfd74b96033dc77234
518518
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
519519
DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54
@@ -546,8 +546,8 @@ SPEC CHECKSUMS:
546546
React-jsiexecutor: a27badbbdbc0ff781813370736a2d1c7261181d4
547547
React-jsinspector: 8a3d3f5dcd23a91e8c80b1bf0e96902cd1dca999
548548
React-logger: 1088859f145b8f6dd0d3ed051a647ef0e3e80fad
549-
react-native-adjust: 0463129823eabe31ff28262295be713ba5f99d2c
550-
react-native-adjust-test: 8a3a43bbe0e7a59a8312a22f4af4e2034d223e7e
549+
react-native-adjust: 9a9d5b7fff8de8209d468ee4bd3fc1bc386d78cd
550+
react-native-adjust-test: 24dcaec553acf560a9aedaa2622498fc8ec29a45
551551
React-perflogger: cb386fd44c97ec7f8199c04c12b22066b0f2e1e0
552552
React-RCTActionSheet: f803a85e46cf5b4066c2ac5e122447f918e9c6e5
553553
React-RCTAnimation: 19c80fa950ccce7f4db76a2a7f2cf79baae07fc7

0 commit comments

Comments
 (0)