Skip to content

Commit fcf3559

Browse files
authored
Merge pull request #190 from adjust/v4310
Version 4.31.0
2 parents e617d76 + ce9db89 commit fcf3559

File tree

190 files changed

+13212
-9429
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

190 files changed

+13212
-9429
lines changed

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
### Version 4.31.0 (10th August 2022)
2+
#### Added
3+
- Added ability to mark your app as COPPA compliant. You can enable this setting by calling `setCoppaCompliantEnabled` method of `AdjustConfig` instance to `true`.
4+
- Added ability to mark your Android app as app for the kids in accordance to Google Play Families policies. You can enable this setting by calling `setPlayStoreKidsAppEnabled` method of `AdjustConfig` instance to `true`.
5+
- Added `checkForNewAttStatus` method to `Adjust` API to allow iOS apps to instruct to SDK to check if `att_status` might have changed in the meantime.
6+
- Added support for Generic ad revenue tracking.
7+
- Added support for `LinkMe` feature.
8+
- Added support to get Facebook install referrer information in attribution callback.
9+
10+
#### Fixed
11+
- Fixed `react-native` 0.69 autolinking issue (https://github.com/adjust/react_native_sdk/pull/186).
12+
13+
#### Native SDKs
14+
- [[email protected]][ios_sdk_v4.31.0]
15+
- [[email protected]][android_sdk_v4.31.0]
16+
17+
---
18+
119
### Version 4.29.6 (26th January 2022)
220
#### Added
321
- Added support to OAID plugin for MSA SDK v1.1.0.
@@ -503,6 +521,7 @@
503521
[ios_sdk_v4.29.4]: https://github.com/adjust/ios_sdk/tree/v4.29.4
504522
[ios_sdk_v4.29.5]: https://github.com/adjust/ios_sdk/tree/v4.29.5
505523
[ios_sdk_v4.29.6]: https://github.com/adjust/ios_sdk/tree/v4.29.6
524+
[ios_sdk_v4.31.0]: https://github.com/adjust/ios_sdk/tree/v4.31.0
506525

507526
[android_sdk_v4.10.4]: https://github.com/adjust/android_sdk/tree/v4.10.4
508527
[android_sdk_v4.11.0]: https://github.com/adjust/android_sdk/tree/v4.11.0
@@ -532,3 +551,4 @@
532551
[android_sdk_v4.28.4]: https://github.com/adjust/android_sdk/tree/v4.28.4
533552
[android_sdk_v4.28.8]: https://github.com/adjust/android_sdk/tree/v4.28.8
534553
[android_sdk_v4.28.9]: https://github.com/adjust/android_sdk/tree/v4.28.9
554+
[android_sdk_v4.31.0]: https://github.com/adjust/android_sdk/tree/v4.31.0

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The Adjust SDK is licensed under the MIT License.
22

3-
Copyright (c) 2012-2018 Adjust GmbH, http://www.adjust.com
3+
Copyright (c) 2012-Present Adjust GmbH, http://www.adjust.com
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 51 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ This is the React Native SDK of Adjust™. You can read more about Adjust™ at
2222
* [AppTrackingTransparency framework](#att-framework)
2323
* [App-tracking authorisation wrapper](#ata-wrapper)
2424
* [Get current authorisation status](#ata-getter)
25+
* [Check for ATT status change](#att-status-change)
2526
* [SKAdNetwork framework](#skadn-framework)
2627
* [Update SKAdNetwork conversion value](#skadn-update-conversion-value)
2728
* [Conversion value updated callback](#skadn-cv-updated-callback)
@@ -62,6 +63,8 @@ This is the React Native SDK of Adjust™. You can read more about Adjust™ at
6263
* [Deferred deep linking](#deeplinking-deferred)
6364
* [Reattribution via deep links](#deeplinking-reattribution)
6465
* [Data residency](#data-residency)
66+
* [COPPA compliance](#coppa-compliance)
67+
* [Play Store Kids Apps](#play-store-kids-apps)
6568
* [License](#license)
6669

6770
## <a id="example-app"></a>Example app
@@ -147,7 +150,6 @@ The Adjust SDK by default adds two permissions to your app's `AndroidManifest.xm
147150

148151
```xml
149152
<uses-permission android:name="android.permission.INTERNET" />
150-
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
151153
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
152154
```
153155

@@ -170,7 +172,7 @@ Since August 1, 2014, apps in the Google Play Store must use the [Google Adverti
170172
In order to do this, open your app's `build.gradle` file and find the `dependencies` block. Add the following line:
171173

172174
```gradle
173-
compile 'com.google.android.gms:play-services-analytics:10.0.1'
175+
implementation 'com.google.android.gms:play-services-ads-identifier:18.0.1'
174176
```
175177

176178
**Note**: The version of the Google Play Services library that you're using is not relevant to the Adjust SDK, as long as the analytics part of the library is present in your app. In the example above, we just used the most recent version of the library at the time of writing.
@@ -209,7 +211,7 @@ In order to correctly attribute an install of your Android app to its source, Ad
209211
In order to support this, add the following line to your app's `build.gradle` file:
210212

211213
```gradle
212-
compile 'com.android.installreferrer:installreferrer:1.0'
214+
compile 'com.android.installreferrer:installreferrer:2.2'
213215
```
214216

215217
`installreferrer` library is part of Google Maven repository, so in order to be able to build your app, you need to add Google Maven repository to your app's `build.gradle` file if you haven't added it already:
@@ -259,7 +261,6 @@ Select your project in the Project Navigator. In the left hand side of the main
259261
* `iAd.framework` - to support Apple Search Ads campaigns
260262
* `AdServices.framework` - to support Apple Search Ads campaigns
261263
* `AdSupport.framework` - to read iOS Advertising Id (IDFA) value
262-
* `CoreTelephony.framework` - to read MCC and MNC information
263264
* `StoreKit.framework` - to communicate with `SKAdNetwork` framework
264265
* `AppTrackingTransparency.framework` - to ask for user's consent to be tracked and obtain status of that consent
265266

@@ -332,6 +333,16 @@ To get the current app tracking authorization status you can call `getAppTrackin
332333
* `3`: The user authorized access to IDFA
333334
* `-1`: The status is not available
334335

336+
### <a id="att-status-change"></a>Check for ATT status change
337+
338+
**Note**: This feature exists only in iOS platform.
339+
340+
In cases where you are not using [Adjust app-tracking authorization wrapper](#ata-wrapper), Adjust SDK will not be able to know immediately upon answering the dialog what is the new value of app-tracking status. In situations like this, if you would want Adjust SDK to read the new app-tracking status value and communicate it to our backend, make sure to make a call to this method:
341+
342+
```js
343+
Adjust.checkForNewAttStatus();
344+
```
345+
335346
### <a id="skadn-framework"></a>SKAdNetwork framework
336347

337348
**Note**: This feature exists only in iOS platform.
@@ -650,24 +661,26 @@ adjustConfig.setAttributionCallbackListener(function(attribution) {
650661
console.log(attribution.costType);
651662
console.log(attribution.costAmount);
652663
console.log(attribution.costCurrency);
664+
console.log(attribution.fbInstallReferrer);
653665
});
654666

655667
Adjust.create(adjustConfig);
656668
```
657669

658670
Within the listener function you have access to the `attribution` parameters. Here is a quick summary of its properties:
659671

660-
- `trackerToken` the tracker token of the current attribution.
661-
- `trackerName` the tracker name of the current attribution.
662-
- `network` the network grouping level of the current attribution.
663-
- `campaign` the campaign grouping level of the current attribution.
664-
- `adgroup` the ad group grouping level of the current attribution.
665-
- `creative` the creative grouping level of the current attribution.
666-
- `clickLabel` the click label of the current attribution.
667-
- `adid` the Adjust device identifier.
668-
- `costType` the cost type.
669-
- `costAmount` the cost amount.
670-
- `costCurrency` the cost currency.
672+
- `trackerToken` the tracker token of the current attribution.
673+
- `trackerName` the tracker name of the current attribution.
674+
- `network` the network grouping level of the current attribution.
675+
- `campaign` the campaign grouping level of the current attribution.
676+
- `adgroup` the ad group grouping level of the current attribution.
677+
- `creative` the creative grouping level of the current attribution.
678+
- `clickLabel` the click label of the current attribution.
679+
- `adid` the Adjust device identifier.
680+
- `costType` the cost type.
681+
- `costAmount` the cost amount.
682+
- `costCurrency` the cost currency.
683+
- `fbInstallReferrer` the cost currency (Android only).
671684

672685
Please make sure to consider our [applicable attribution data policies][attribution-data].
673686

@@ -861,19 +874,9 @@ Upon receiving this information, Adjust changes sharing the specific user's data
861874

862875
### <a id="sdk-signature"></a>SDK signature
863876

864-
An account manager must activate the Adjust SDK signature. Contact Adjust support ([email protected]) if you are interested in using this feature.
877+
When you set up the SDK Signature, each SDK communication package is "signed". This lets Adjust’s servers easily detect and reject any install activity that is not legitimate.
865878

866-
If the SDK signature has already been enabled on your account and you have access to App Secrets in your Adjust Dashboard, please use the method below to integrate the SDK signature into your app.
867-
868-
An App Secret is set by passing all secret parameters (`secretId`, `info1`, `info2`, `info3`, `info4`) to `setAppSecret` method of `AdjustConfig` instance:
869-
870-
```js
871-
var adjustConfig = new AdjustConfig(appToken, environment);
872-
873-
adjustConfig.setAppSecret(secretId, info1, info2, info3, info4);
874-
875-
Adjust.create(adjustConfig);
876-
```
879+
There are just a few steps involved in setting up the SDK Signature. Please contact your Technical Account Manager or [email protected] to get started.
877880

878881
### <a id="background-tracking"></a>Background tracking
879882

@@ -1123,6 +1126,26 @@ adjustConfig.setUrlStrategy(AdjustConfig.DataResidencyTR); // for Turkey data re
11231126
adjustConfig.setUrlStrategy(AdjustConfig.DataResidencyUS); // for US data residency region
11241127
```
11251128

1129+
### <a id="coppa-compliance"></a>COPPA compliance
1130+
1131+
By default Adjust SDK doesn't mark app as COPPA compliant. In order to mark your app as COPPA compliant, make sure to call `setCoppaCompliantEnabled` method of `AdjustConfig` instance with parameter `true`:
1132+
1133+
```js
1134+
adjustConfig.setCoppaCompliantEnabled(true);
1135+
```
1136+
1137+
**Note:** By enabling this feature, third-party sharing will be automatically disabled for the users. If later during the app lifetime you decide not to mark app as COPPA compliant anymore, third-party sharing **will not be automatically re-enabled**. Instead, next to not marking your app as COPPA compliant anymore, you will need to explicitly re-enable third-party sharing in case you want to do that.
1138+
1139+
### <a id="play-store-kids-apps"></a>Play Store Kids Apps
1140+
1141+
**Note**: This feature exists only in Android platform.
1142+
1143+
By default Adjust SDK doesn't mark Android app as Play Store Kids App. In order to mark your app as the app which is targetting kids in Play Store, make sure to call `setPlayStoreKidsAppEnabled` method of `AdjustConfig` instance with parameter `true`:
1144+
1145+
```js
1146+
adjustConfig.setPlayStoreKidsAppEnabled(true);
1147+
```
1148+
11261149
[dashboard]: http://adjust.com
11271150
[adjust.com]: http://adjust.com
11281151

@@ -1153,7 +1176,7 @@ adjustConfig.setUrlStrategy(AdjustConfig.DataResidencyUS); // for US data reside
11531176

11541177
The Adjust SDK is licensed under the MIT License.
11551178

1156-
Copyright (c) 2012-2021 Adjust GmbH, http://www.adjust.com
1179+
Copyright (c) 2012-Present Adjust GmbH, http://www.adjust.com
11571180

11581181
Permission is hereby granted, free of charge, to any person obtaining a copy of
11591182
this software and associated documentation files (the "Software"), to deal in

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.29.6
1+
4.31.0

android/libs/adjust-android.jar

-2.28 KB
Binary file not shown.

android/src/main/java/com/adjust/sdk/Adjust.java

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ public void create(ReadableMap mapConfig) {
125125
boolean readMobileEquipmentIdentity = false;
126126
boolean preinstallTrackingEnabled = false;
127127
boolean needsCost = false;
128+
boolean playStoreKidsAppEnabled = false;
129+
boolean coppaCompliantEnabled = false;
128130

129131
// Suppress log level.
130132
if (checkKey(mapConfig, "logLevel")) {
@@ -223,6 +225,7 @@ public void create(ReadableMap mapConfig) {
223225
adjustConfig.setUserAgent(userAgent);
224226
}
225227

228+
// Preinstall file path.
226229
if (checkKey(mapConfig, "preinstallFilePath")) {
227230
preinstallFilePath = mapConfig.getString("preinstallFilePath");
228231
adjustConfig.setPreinstallFilePath(preinstallFilePath);
@@ -275,6 +278,12 @@ && checkKey(mapConfig, "info4")) {
275278
adjustConfig.setNeedsCost(needsCost);
276279
}
277280

281+
// Google Play Store kids app.
282+
if (checkKey(mapConfig, "playStoreKidsAppEnabled")) {
283+
playStoreKidsAppEnabled = mapConfig.getBoolean("playStoreKidsAppEnabled");
284+
adjustConfig.setPlayStoreKidsAppEnabled(playStoreKidsAppEnabled);
285+
}
286+
278287
// Launching deferred deep link.
279288
if (checkKey(mapConfig, "shouldLaunchDeeplink")) {
280289
shouldLaunchDeeplink = mapConfig.getBoolean("shouldLaunchDeeplink");
@@ -287,6 +296,12 @@ && checkKey(mapConfig, "info4")) {
287296
adjustConfig.setDelayStart(delayStart);
288297
}
289298

299+
// COPPA compliance.
300+
if (checkKey(mapConfig, "coppaCompliantEnabled")) {
301+
coppaCompliantEnabled = mapConfig.getBoolean("coppaCompliantEnabled");
302+
adjustConfig.setCoppaCompliantEnabled(coppaCompliantEnabled);
303+
}
304+
290305
// Attribution callback.
291306
if (attributionCallback) {
292307
adjustConfig.setOnAttributionChangedListener(this);
@@ -714,7 +729,7 @@ public void updateConversionValue(int conversionValue) {
714729

715730
@ReactMethod
716731
public void getAppTrackingAuthorizationStatus(Callback callback) {
717-
callback.invoke("-1");
732+
callback.invoke(-1);
718733
}
719734

720735
@ReactMethod
@@ -755,6 +770,11 @@ public void trackMeasurementConsent(boolean measurementConsent) {
755770
com.adjust.sdk.Adjust.trackMeasurementConsent(measurementConsent);
756771
}
757772

773+
@ReactMethod
774+
public void checkForNewAttStatus() {
775+
// do nothing
776+
}
777+
758778
@ReactMethod
759779
public void setAttributionCallbackListener() {
760780
this.attributionCallback = true;

android/src/main/java/com/adjust/sdk/AdjustUtil.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ final class AdjustUtil {
3030
private static final String ATTRIBUTION_COST_TYPE = "costType";
3131
private static final String ATTRIBUTION_COST_AMOUNT = "costAmount";
3232
private static final String ATTRIBUTION_COST_CURRENCY = "costCurrency";
33+
private static final String ATTRIBUTION_FB_INSTALL_REFERRER = "fbInstallReferrer";
3334

3435
private static final String EVENT_SUCCESS_MESSAGE = "message";
3536
private static final String EVENT_SUCCESS_TIMESTAMP = "timestamp";
@@ -74,6 +75,7 @@ public static WritableMap attributionToMap(AdjustAttribution attribution) {
7475
map.putString(ATTRIBUTION_COST_TYPE, null != attribution.costType ? attribution.costType : "");
7576
map.putDouble(ATTRIBUTION_COST_AMOUNT, null != attribution.costAmount && !attribution.costAmount.isNaN() ? attribution.costAmount : 0);
7677
map.putString(ATTRIBUTION_COST_CURRENCY, null != attribution.costCurrency ? attribution.costCurrency : "");
78+
map.putString(ATTRIBUTION_FB_INSTALL_REFERRER, null != attribution.fbInstallReferrer ? attribution.fbInstallReferrer : "");
7779
return map;
7880
}
7981

example/.eslintrc.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
root: true,
3+
extends: '@react-native-community',
4+
};

example/.flowconfig

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
[ignore]
2+
; We fork some components by platform
3+
.*/*[.]android.js
4+
5+
; Ignore "BUCK" generated dirs
6+
<PROJECT_ROOT>/\.buckd/
7+
8+
; Ignore polyfills
9+
node_modules/react-native/Libraries/polyfills/.*
10+
11+
; Flow doesn't support platforms
12+
.*/Libraries/Utilities/LoadingView.js
13+
14+
.*/node_modules/resolve/test/resolver/malformed_package_json/package\.json$
15+
16+
[untyped]
17+
.*/node_modules/@react-native-community/cli/.*/.*
18+
19+
[include]
20+
21+
[libs]
22+
node_modules/react-native/interface.js
23+
node_modules/react-native/flow/
24+
25+
[options]
26+
emoji=true
27+
28+
exact_by_default=true
29+
30+
format.bracket_spacing=false
31+
32+
module.file_ext=.js
33+
module.file_ext=.json
34+
module.file_ext=.ios.js
35+
36+
munge_underscores=true
37+
38+
module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/node_modules/react-native/\1'
39+
module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '<PROJECT_ROOT>/node_modules/react-native/Libraries/Image/RelativeImageStub'
40+
41+
suppress_type=$FlowIssue
42+
suppress_type=$FlowFixMe
43+
suppress_type=$FlowFixMeProps
44+
suppress_type=$FlowFixMeState
45+
46+
[lints]
47+
sketchy-null-number=warn
48+
sketchy-null-mixed=warn
49+
sketchy-number=warn
50+
untyped-type-import=warn
51+
nonstrict-import=warn
52+
deprecated-type=warn
53+
unsafe-getters-setters=warn
54+
unnecessary-invariant=warn
55+
56+
[strict]
57+
deprecated-type
58+
nonstrict-import
59+
sketchy-null
60+
unclear-type
61+
unsafe-getters-setters
62+
untyped-import
63+
untyped-type-import
64+
65+
[version]
66+
^0.176.3

example/.gitattributes

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)