Skip to content

Commit 06485b0

Browse files
authored
Merge pull request #100 from adjust/v4230
Version 4.23.0
2 parents dc32865 + 1d32dfd commit 06485b0

Some content is hidden

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

58 files changed

+3949
-2651
lines changed

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
### Version 4.23.0 (28th August 2020)
2+
#### Added
3+
- Added communication with SKAdNetwork framework by default on iOS 14.
4+
- Added method `deactivateSKAdNetworkHandling` method to `AdjustConfig` to switch off default communication with SKAdNetwork framework in iOS 14.
5+
- Added wrapper method `requestTrackingAuthorizationWithCompletionHandler` to `Adjust` to allow asking for user's consent to be tracked in iOS 14 and immediate propagation of user's choice to backend.
6+
- Added handling of new iAd framework error codes introduced in iOS 14.
7+
- Added sending of value of user's consent to be tracked with each package.
8+
- Added `setUrlStrategy` method to `AdjustConfig` class to allow selection of URL strategy for specific market.
9+
10+
⚠️ **Note**: iOS 14 beta versions prior to 5 appear to have an issue when trying to use iAd framework API like described in [here](https://github.com/adjust/ios_sdk/issues/452). For testing of v4.23.0 version of SDK in iOS, please make sure you're using **iOS 14 beta 5 or later**.
11+
12+
#### Native SDKs
13+
- [[email protected]][ios_sdk_v4.23.0]
14+
- [[email protected]][android_sdk_v4.24.0]
15+
16+
---
17+
118
### Version 4.22.0 (6th June 2020)
219
#### Added
320
- Added subscription tracking feature.
@@ -354,6 +371,7 @@
354371
[ios_sdk_v4.21.0]: https://github.com/adjust/ios_sdk/tree/v4.21.0
355372
[ios_sdk_v4.21.3]: https://github.com/adjust/ios_sdk/tree/v4.21.3
356373
[ios_sdk_v4.22.1]: https://github.com/adjust/ios_sdk/tree/v4.22.1
374+
[ios_sdk_v4.23.0]: https://github.com/adjust/ios_sdk/tree/v4.23.0
357375

358376
[android_sdk_v4.10.4]: https://github.com/adjust/android_sdk/tree/v4.10.4
359377
[android_sdk_v4.11.0]: https://github.com/adjust/android_sdk/tree/v4.11.0
@@ -374,3 +392,4 @@
374392
[android_sdk_v4.21.0]: https://github.com/adjust/android_sdk/tree/v4.21.0
375393
[android_sdk_v4.21.1]: https://github.com/adjust/android_sdk/tree/v4.21.1
376394
[android_sdk_v4.22.0]: https://github.com/adjust/android_sdk/tree/v4.22.0
395+
[android_sdk_v4.24.0]: https://github.com/adjust/android_sdk/tree/v4.24.0

README.md

Lines changed: 75 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,12 @@ This is the React Native SDK of Adjust™. You can read more about Adjust™ at
1616
* [Install referrer](#android-referrer)
1717
* [Google Play Referrer API](#android-referrer-gpr-api)
1818
* [Google Play Store intent](#android-referrer-gps-intent)
19+
* [Huawei Referrer API](#android-huawei-referrer-api)
1920
* [iOS frameworks](#ios-frameworks)
2021
* [Additional features](#additional-features)
22+
* [AppTrackingTransparency framework](#att-framework)
23+
* [App-tracking authorisation wrapper](#ata-wrapper)
24+
* [SKAdNetwork framework](#skadn-framework)
2125
* [Event tracking](#event-tracking)
2226
* [Revenue tracking](#revenue-tracking)
2327
* [Revenue deduplication](#revenue-deduplication)
@@ -271,20 +275,89 @@ The Google Play Store `INSTALL_REFERRER` intent should be captured with a broadc
271275

272276
Please bear in mind that, if you are using your own broadcast receiver which handles the `INSTALL_REFERRER` intent, you don't need to add the Adjust broadcast receiver to your manifest file. You can remove it, but inside your own receiver add the call to the Adjust broadcast receiver as described in our [Android guide][broadcast-receiver-custom].
273277

278+
#### <a id="android-huawei-referrer-api"></a>Huawei Referrer API
279+
280+
As of v4.22.0, the Adjust SDK supports install tracking on Huawei devices with Huawei App Gallery version 10.4 and higher. No additional integration steps are needed to start using the Huawei Referrer API.
281+
274282
### <a id="ios-frameworks"></a>iOS frameworks
275283

276-
Select your project in the Project Navigator. In the left hand side of the main view, select your target. In the tab `Build Phases`, expand the group `Link Binary with Libraries`. On the bottom of that section click on the `+` button. Select the `AdSupport.framework` and click the `Add` button. Unless you are using `tvOS`, repeat the same steps to add the `iAd.framework` and `CoreTelephony.framework`. Change the `Status` of both frameworks to `Optional`. Adjust SDK uses these frameworks with following purpose:
284+
Select your project in the Project Navigator. In the left hand side of the main view, select your target. In the tab `Build Phases`, expand the group `Link Binary with Libraries`. On the bottom of that section click on the `+` button. Select the `AdSupport.framework` and click the `Add` button. Unless you are using `tvOS`, repeat the same steps to add the `iAd.framework`, `CoreTelephony.framework`, `AppTrackingTransparency.framework` and `StoreKit.framework`. Change the `Status` of both frameworks to `Optional`. Adjust SDK uses these frameworks with following purpose:
277285

278286
* `iAd.framework` - in case you are running iAd campaigns
279287
* `AdSupport.framework` - for reading iOS Advertising Id (IDFA)
280288
* `CoreTelephony.framework` - for reading MCC and MNC information
289+
* `StoreKit.framework` - for communication with SKAdNetwork framework
290+
* `AppTrackingTransparency.framework` - to ask for user's consent to be tracked and obtain status of that consent
281291

282-
If you are not running any iAd campaigns, you can feel free to remove the `iAd.framework` dependency.
292+
If you are not running any iAd campaigns, you can feel free to remove the `iAd.framework` dependency. If you don't use SKAdNetwork framework, feel free to remove `StoreKit.framework` dependency (unless you need it for something else).
283293

284294
## <a id="additional-features"></a>Additional features
285295

286296
You can take advantage of the following features once the Adjust SDK is integrated into your project.
287297

298+
### <a id="att-framework"></a>AppTrackingTransparency framework
299+
300+
**Note**: This feature exists only in iOS platform.
301+
302+
For each package sent, the Adjust backend receives one of the following four (4) states of consent for access to app-related data that can be used for tracking the user or the device:
303+
304+
- Authorized
305+
- Denied
306+
- Not Determined
307+
- Restricted
308+
309+
After a device receives an authorization request to approve access to app-related data, which is used for user device tracking, the returned status will either be Authorized or Denied.
310+
311+
Before a device receives an authorization request for access to app-related data, which is used for tracking the user or device, the returned status will be Not Determined.
312+
313+
If authorization to use app tracking data is restricted, the returned status will be Restricted.
314+
315+
The SDK has a built-in mechanism to receive an updated status after a user responds to the pop-up dialog, in case you don't want to customize your displayed dialog pop-up. To conveniently and efficiently communicate the new state of consent to the backend, Adjust SDK offers a wrapper around the app tracking authorization method described in the following chapter, App-tracking authorization wrapper.
316+
317+
### <a id="ata-wrapper"></a>App-tracking authorisation wrapper
318+
319+
**Note**: This feature exists only in iOS platform.
320+
321+
Adjust SDK offers the possibility to use it for requesting user authorization in accessing their app-related data. Adjust SDK has a wrapper built on top of the [requestTrackingAuthorizationWithCompletionHandler:](https://developer.apple.com/documentation/apptrackingtransparency/attrackingmanager/3547037-requesttrackingauthorizationwith?language=objc) method, where you can as well define the callback method to get information about a user's choice. Also, with the use of this wrapper, as soon as a user responds to the pop-up dialog, it's then communicated back using your callback method. The SDK will also inform the backend of the user's choice. Integer value will be delivered via your callback method with the following meaning:
322+
323+
- 0: `ATTrackingManagerAuthorizationStatusNotDetermined`
324+
- 1: `ATTrackingManagerAuthorizationStatusRestricted`
325+
- 2: `ATTrackingManagerAuthorizationStatusDenied`
326+
- 3: `ATTrackingManagerAuthorizationStatusAuthorized`
327+
328+
To use this wrapper, you can call it as such:
329+
330+
```js
331+
Adjust.requestTrackingAuthorizationWithCompletionHandler(function(status) {
332+
switch (status) {
333+
case 0:
334+
// ATTrackingManagerAuthorizationStatusNotDetermined case
335+
break;
336+
case 1:
337+
// ATTrackingManagerAuthorizationStatusRestricted case
338+
break;
339+
case 2:
340+
// ATTrackingManagerAuthorizationStatusDenied case
341+
break;
342+
case 3:
343+
// ATTrackingManagerAuthorizationStatusAuthorized case
344+
break;
345+
}
346+
});
347+
```
348+
349+
### <a id="skadn-framework"></a>SKAdNetwork framework
350+
351+
**Note**: This feature exists only in iOS platform.
352+
353+
If you have implemented the Adjust iOS SDK v4.23.0 or above and your app is running on iOS 14, the communication with SKAdNetwork will be set on by default, although you can choose to turn it off. When set on, Adjust automatically registers for SKAdNetwork attribution when the SDK is initialized. If events are set up in the Adjust dashboard to receive conversion values, the Adjust backend sends the conversion value data to the SDK. The SDK then sets the conversion value. After Adjust receives the SKAdNetwork callback data, it is then displayed in the dashboard.
354+
355+
In case you don't want the Adjust SDK to automatically communicate with SKAdNetwork, you can disable that by calling the following method on configuration object:
356+
357+
```js
358+
adjustConfig.deactivateSKAdNetworkHandling();
359+
```
360+
288361
### <a id="event-tracking"></a>Event tracking
289362

290363
You can use Adjust to track all kinds of events. Let's say you want to track every tap on a button. Simply create a new event token in your [dashboard]. Let's say that event token is `abc123`. You can add the following line in your button’s click handler method to track the click:

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.22.0
1+
4.23.0

android/libs/adjust-android.jar

14.9 KB
Binary file not shown.

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ public void create(ReadableMap mapConfig) {
108108
String processName = null;
109109
String defaultTracker = null;
110110
String externalDeviceId = null;
111+
String urlStrategy = null;
111112
long secretId = 0L;
112113
long info1 = 0L;
113114
long info2 = 0L;
@@ -196,6 +197,16 @@ public void create(ReadableMap mapConfig) {
196197
adjustConfig.setExternalDeviceId(externalDeviceId);
197198
}
198199

200+
// URL strategy.
201+
if (checkKey(mapConfig, "urlStrategy")) {
202+
urlStrategy = mapConfig.getString("urlStrategy");
203+
if (urlStrategy.equalsIgnoreCase("china")) {
204+
adjustConfig.setUrlStrategy(AdjustConfig.URL_STRATEGY_CHINA);
205+
} else if (urlStrategy.equalsIgnoreCase("india")) {
206+
adjustConfig.setUrlStrategy(AdjustConfig.URL_STRATEGY_INDIA);
207+
}
208+
}
209+
199210
// User agent.
200211
if (checkKey(mapConfig, "userAgent")) {
201212
userAgent = mapConfig.getString("userAgent");
@@ -576,6 +587,11 @@ public void convertUniversalLink(final String url, final String scheme, final Ca
576587
callback.invoke("");
577588
}
578589

590+
@ReactMethod
591+
public void requestTrackingAuthorizationWithCompletionHandler(Callback callback) {
592+
callback.invoke("");
593+
}
594+
579595
@ReactMethod
580596
public void setAttributionCallbackListener() {
581597
this.attributionCallback = true;

example/App.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ const App: () => React$Node = () => {
4040
// adjustConfig.setDelayStart(6.0);
4141
// adjustConfig.setEventBufferingEnabled(true);
4242
// adjustConfig.setUserAgent("Custom Adjust User Agent");
43+
adjustConfig.setUrlStrategy(AdjustConfig.UrlStrategyChina);
44+
adjustConfig.deactivateSKAdNetworkHandling();
4345

4446
adjustConfig.setAttributionCallbackListener(function(attribution) {
4547
console.log("Attribution callback received");
@@ -108,6 +110,28 @@ const App: () => React$Node = () => {
108110
// Adjust.resetSessionCallbackParameters();
109111
// Adjust.resetSessionPartnerParameters();
110112

113+
Adjust.requestTrackingAuthorizationWithCompletionHandler(function (status) {
114+
console.log("Authorization status update");
115+
switch (status) {
116+
case 0:
117+
// ATTrackingManagerAuthorizationStatusNotDetermined case
118+
console.log("Authorization status: ATTrackingManagerAuthorizationStatusNotDetermined");
119+
break;
120+
case 1:
121+
// ATTrackingManagerAuthorizationStatusRestricted case
122+
console.log("Authorization status: ATTrackingManagerAuthorizationStatusRestricted");
123+
break;
124+
case 2:
125+
// ATTrackingManagerAuthorizationStatusDenied case
126+
console.log("Authorization status: ATTrackingManagerAuthorizationStatusDenied");
127+
break;
128+
case 3:
129+
// ATTrackingManagerAuthorizationStatusAuthorized case
130+
console.log("Authorization status: ATTrackingManagerAuthorizationStatusAuthorized");
131+
break;
132+
}
133+
});
134+
111135
AdjustOaid.readOaid();
112136
Adjust.create(adjustConfig);
113137

example/android/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ android {
133133
minSdkVersion rootProject.ext.minSdkVersion
134134
targetSdkVersion rootProject.ext.targetSdkVersion
135135
versionCode 1
136-
versionName "4.22.0"
136+
versionName "4.23.0"
137137
}
138138
splits {
139139
abi {

example/ios/Example.xcodeproj/project.pbxproj

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@
1818
2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
1919
2DCD954D1E0B4F2C00145EB5 /* ExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* ExampleTests.m */; };
2020
4839C605884D648B39FDABCA /* libPods-Example-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E087459BCF5409F7E05C62AF /* libPods-Example-tvOS.a */; };
21+
9D2606D524F8831600E6A596 /* AppTrackingTransparency.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D2606D424F8831600E6A596 /* AppTrackingTransparency.framework */; };
22+
9D2606D924F8832300E6A596 /* StoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D2606D824F8832300E6A596 /* StoreKit.framework */; };
23+
9D2606DB24F8832900E6A596 /* AdSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D2606DA24F8832900E6A596 /* AdSupport.framework */; };
24+
9D2606DD24F8832D00E6A596 /* iAd.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D2606DC24F8832D00E6A596 /* iAd.framework */; };
25+
9D2606DF24F8833300E6A596 /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D2606DE24F8833300E6A596 /* CoreTelephony.framework */; };
2126
BCB9158A9F5778C9BEE6E144 /* libPods-Example.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 59AFA88E5DB9499067C92687 /* libPods-Example.a */; };
2227
F3CD60700218F6B493962DC1 /* libPods-Example-ExampleTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 621EEB5BA88EA61B55791395 /* libPods-Example-ExampleTests.a */; };
2328
/* End PBXBuildFile section */
@@ -60,6 +65,12 @@
6065
621EEB5BA88EA61B55791395 /* libPods-Example-ExampleTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Example-ExampleTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
6166
7CC442113DDDE77A0E4B4D86 /* Pods-Example-tvOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example-tvOS.release.xcconfig"; path = "Target Support Files/Pods-Example-tvOS/Pods-Example-tvOS.release.xcconfig"; sourceTree = "<group>"; };
6267
845150E1D833B4F50A639E53 /* libPods-Example-tvOSTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Example-tvOSTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
68+
9D2606D424F8831600E6A596 /* AppTrackingTransparency.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppTrackingTransparency.framework; path = System/Library/Frameworks/AppTrackingTransparency.framework; sourceTree = SDKROOT; };
69+
9D2606D624F8831A00E6A596 /* StoreKitTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = StoreKitTest.framework; path = Developer/Library/Frameworks/StoreKitTest.framework; sourceTree = SDKROOT; };
70+
9D2606D824F8832300E6A596 /* StoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = StoreKit.framework; path = System/Library/Frameworks/StoreKit.framework; sourceTree = SDKROOT; };
71+
9D2606DA24F8832900E6A596 /* AdSupport.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AdSupport.framework; path = System/Library/Frameworks/AdSupport.framework; sourceTree = SDKROOT; };
72+
9D2606DC24F8832D00E6A596 /* iAd.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = iAd.framework; path = System/Library/Frameworks/iAd.framework; sourceTree = SDKROOT; };
73+
9D2606DE24F8833300E6A596 /* CoreTelephony.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreTelephony.framework; path = System/Library/Frameworks/CoreTelephony.framework; sourceTree = SDKROOT; };
6374
A973B9CBB5673BAA3EAD0A64 /* Pods-Example-tvOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example-tvOS.debug.xcconfig"; path = "Target Support Files/Pods-Example-tvOS/Pods-Example-tvOS.debug.xcconfig"; sourceTree = "<group>"; };
6475
B1CF934BC273C8EE588D6E39 /* Pods-Example-ExampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example-ExampleTests.release.xcconfig"; path = "Target Support Files/Pods-Example-ExampleTests/Pods-Example-ExampleTests.release.xcconfig"; sourceTree = "<group>"; };
6576
CEADF439DD607D632E350619 /* Pods-Example-ExampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example-ExampleTests.debug.xcconfig"; path = "Target Support Files/Pods-Example-ExampleTests/Pods-Example-ExampleTests.debug.xcconfig"; sourceTree = "<group>"; };
@@ -82,7 +93,12 @@
8293
isa = PBXFrameworksBuildPhase;
8394
buildActionMask = 2147483647;
8495
files = (
96+
9D2606D924F8832300E6A596 /* StoreKit.framework in Frameworks */,
97+
9D2606DD24F8832D00E6A596 /* iAd.framework in Frameworks */,
98+
9D2606DB24F8832900E6A596 /* AdSupport.framework in Frameworks */,
8599
BCB9158A9F5778C9BEE6E144 /* libPods-Example.a in Frameworks */,
100+
9D2606DF24F8833300E6A596 /* CoreTelephony.framework in Frameworks */,
101+
9D2606D524F8831600E6A596 /* AppTrackingTransparency.framework in Frameworks */,
86102
);
87103
runOnlyForDeploymentPostprocessing = 0;
88104
};
@@ -139,6 +155,12 @@
139155
2D16E6871FA4F8E400B85C8A /* Frameworks */ = {
140156
isa = PBXGroup;
141157
children = (
158+
9D2606DE24F8833300E6A596 /* CoreTelephony.framework */,
159+
9D2606DC24F8832D00E6A596 /* iAd.framework */,
160+
9D2606DA24F8832900E6A596 /* AdSupport.framework */,
161+
9D2606D824F8832300E6A596 /* StoreKit.framework */,
162+
9D2606D624F8831A00E6A596 /* StoreKitTest.framework */,
163+
9D2606D424F8831600E6A596 /* AppTrackingTransparency.framework */,
142164
ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
143165
ED2971642150620600B7C4FE /* JavaScriptCore.framework */,
144166
59AFA88E5DB9499067C92687 /* libPods-Example.a */,
@@ -291,6 +313,7 @@
291313
TestTargetID = 13B07F861A680F5B00A75B9A;
292314
};
293315
13B07F861A680F5B00A75B9A = {
316+
DevelopmentTeam = QGUGW9AUMK;
294317
LastSwiftMigration = 1120;
295318
};
296319
2D02E47A1E0B4A5D006451C7 = {
@@ -629,14 +652,15 @@
629652
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
630653
CLANG_ENABLE_MODULES = YES;
631654
CURRENT_PROJECT_VERSION = 1;
655+
DEVELOPMENT_TEAM = QGUGW9AUMK;
632656
ENABLE_BITCODE = NO;
633657
GCC_PREPROCESSOR_DEFINITIONS = (
634658
"$(inherited)",
635659
"FB_SONARKIT_ENABLED=1",
636660
);
637661
INFOPLIST_FILE = Example/Info.plist;
638662
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
639-
MARKETING_VERSION = 4.22.0;
663+
MARKETING_VERSION = 4.23.0;
640664
OTHER_LDFLAGS = (
641665
"$(inherited)",
642666
"-ObjC",
@@ -657,9 +681,10 @@
657681
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
658682
CLANG_ENABLE_MODULES = YES;
659683
CURRENT_PROJECT_VERSION = 1;
684+
DEVELOPMENT_TEAM = QGUGW9AUMK;
660685
INFOPLIST_FILE = Example/Info.plist;
661686
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
662-
MARKETING_VERSION = 4.22.0;
687+
MARKETING_VERSION = 4.23.0;
663688
OTHER_LDFLAGS = (
664689
"$(inherited)",
665690
"-ObjC",

0 commit comments

Comments
 (0)