Skip to content

Commit 854b694

Browse files
6.3.20
6.3.20
2 parents 1cedfa0 + c6b241a commit 854b694

File tree

14 files changed

+62
-89
lines changed

14 files changed

+62
-89
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
# Versions
2+
## 6.3.20
3+
- iOS SDK 6.3.2
4+
- Android SDK 6.3.2
5+
- Fix exception in UDL-android first launch callback parsing
6+
- Add disableAdvertisingIdentifier api in android
7+
28
## 6.3.0
39
- iOS SDK 6.3.0
410
- Android SDK 6.3.0

Docs/API.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -741,21 +741,17 @@ appsFlyer.disableCollectASA(true);
741741
---
742742
743743
##### <a id="disableAdvertisingIdentifier"> **`disableAdvertisingIdentifier(shouldDisable)`**
744-
745-
❗(iOS only)
746744
747-
Disables IDFA collecting
745+
Disables IDFA collection in iOS and Advertising ID in Android. should be called before `initSdk`.
748746
749747
| parameter | type | description |
750748
| ---------- |----------|------------------ |
751-
| shouldDisable | boolean | Flag to disable/enable IDFA collection |
749+
| isDisable | boolean | Flag to disable/enable IDFA/Advertising ID collection |
752750
753751
*Example:*
754752
755753
```javascript
756-
if (Platform.OS == 'ios') {
757754
appsFlyer.disableAdvertisingIdentifier(true);
758-
}
759755
```
760756
761757
---

README.md

Lines changed: 23 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121

2222
### <a id="plugin-build-for"> This plugin is built for
2323

24-
- iOS AppsFlyerSDK **v6.3.0**
25-
- Android AppsFlyerSDK **v6.3.0**
24+
- iOS AppsFlyerSDK **v6.3.2**
25+
- Android AppsFlyerSDK **v6.3.2**
2626

2727
## <a id="breaking-changes"> ❗ Breaking Changes
2828

@@ -76,38 +76,34 @@ If your app does not support autolinking, check out the Installation Guide [here
7676

7777
## <a id="appKids"> 👨‍👩‍👧‍👦 Add or Remove Strict mode for App-kids
7878

79-
Starting from version **6.1.10** iOS SDK comes in two variants: **Strict** mode and **Regular** mode. Please read more [here](https://support.appsflyer.com/hc/en-us/articles/207032066#integration-strict-mode-sdk)
80-
79+
Starting from version **6.1.10** iOS SDK comes in two variants: **Strict** mode and **Regular** mode. Please read more [here](https://support.appsflyer.com/hc/en-us/articles/207032066#integration-strict-mode-sdk) <br>
80+
***Version <= 6.3.0:*** read this section of the README.md in branch: `releases/6.x.x/6.3.x/6.3.0`<br>
8181
***Change to Strict mode***<br>
82-
After you [installed](#installation) the AppsFlyer plugin, go to the `react-native-appsflyer` folder inside the `node_modules` folder:
83-
```
84-
cd node_modules/react-native-appsflyer
85-
```
86-
Run the script `changeMode.sh strict`
87-
```
88-
./changeMode.sh strict
82+
After you [installed](#installation) the AppsFlyer plugin, add `$RNAppsFlyerStrictMode=true` in the project's Podfile:
8983
```
90-
Go to the `ios` folder in your `root` project
91-
```
92-
cd ../../ios
84+
//MyRNApp/ios/Podfile
85+
...
86+
use_frameworks!
87+
$RNAppsFlyerStrictMode=true
88+
89+
# Pods for MyRNApp
90+
...
91+
9392
```
94-
Run `pod install`
93+
In the `ios` folder of your `root` project Run `pod install`
9594

9695
***Change to Regular mode***<br>
97-
Go to the `react-native-appsflyer` folder inside the `node_modules` folder:
96+
Remove `$RNAppsFlyerStrictMode=true` from the project's Podfile or set it to `false`:
9897
```
99-
cd node_modules/react-native-appsflyer
100-
```
101-
Run the script `changeMode.sh` (WITHOUT `strict`)
102-
```
103-
./changeMode.sh
104-
```
105-
Go to the `ios` folder in your `root` project
106-
```
107-
cd ../../ios
108-
```
109-
Run `pod install`
98+
//MyRNApp/ios/Podfile
99+
...
100+
use_frameworks!
101+
$RNAppsFlyerStrictMode=false //OR remove this line
110102
103+
# Pods for MyRNApp
104+
...
105+
```
106+
In the `ios` folder of your `root` project Run `pod install`
111107
## <a id="init-sdk"> 🚀 Initializing the SDK
112108

113109
Initialize the SDK to enable AppsFlyer to detect installations, sessions (app opens) and updates.<br>

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ repositories {
5555
dependencies {
5656
implementation "com.facebook.react:react-native:${safeExtGet('reactNativeVersion', '+')}"
5757
implementation "com.android.installreferrer:installreferrer:${safeExtGet('installReferrerVersion', '2.1')}"
58-
implementation "com.appsflyer:af-android-sdk:${safeExtGet('appsflyerVersion', '6.3.0')}"
58+
implementation "com.appsflyer:af-android-sdk:${safeExtGet('appsflyerVersion', '6.3.2')}"
5959
//-----
6060
// Required -- JUnit 4 framework
6161
testImplementation 'junit:junit:4.12'

android/src/main/java/com/appsflyer/reactnative/RNAppsFlyerModule.java

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,13 @@ public void onDeepLinking(@NonNull DeepLinkResult deepLinkResult) {
176176
deepLinkObj.put("status", afSuccess);
177177
deepLinkObj.put("deepLinkStatus", deepLinkResult.getStatus());
178178
deepLinkObj.put("type", afOnDeepLinking);
179-
deepLinkObj.put("data", deepLinkResult.getDeepLink().getClickEvent());
180-
deepLinkObj.put("isDeferred", deepLinkResult.getDeepLink().isDeferred());
179+
if (deepLinkResult.getStatus() == DeepLinkResult.Status.FOUND) {
180+
deepLinkObj.put("data", deepLinkResult.getDeepLink().getClickEvent());
181+
deepLinkObj.put("isDeferred", deepLinkResult.getDeepLink().isDeferred());
182+
}else{
183+
deepLinkObj.put("data", "");
184+
deepLinkObj.put("isDeferred", "");
185+
}
181186
} catch (JSONException e) {
182187
e.printStackTrace();
183188
}
@@ -725,4 +730,9 @@ public void addPushNotificationDeepLinkPath(ReadableArray path, Callback success
725730
errorCallback.invoke(e);
726731
}
727732
}
733+
734+
@ReactMethod
735+
public void disableAdvertisingIdentifier(Boolean isDisabled) {
736+
AppsFlyerLib.getInstance().setDisableAdvertisingIdentifiers(isDisabled);
737+
}
728738
}

changeMode.sh

Lines changed: 0 additions & 7 deletions
This file was deleted.

index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,11 @@ declare module "react-native-appsflyer" {
9191
sendPushNotificationData(pushPayload: object): void
9292
setHost(hostPrefix: string, hostName: string, success: SuccessCB): void
9393
addPushNotificationDeepLinkPath(path: string[], successC: SuccessCB, errorC: ErrorCB): void
94+
disableAdvertisingIdentifier(isDisable: boolean): void
9495

9596
/**
9697
* For iOS Only
9798
* */
98-
disableAdvertisingIdentifier(shouldDisable: boolean): void
9999
disableCollectASA(shouldDisable: boolean): void
100100
setUseReceiptValidationSandbox(isSandbox: boolean): void
101101
disableSKAD(disableSkad: boolean): void

index.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -519,12 +519,11 @@ appsFlyer.setSharingFilter = (partners, successC, errorC) => {
519519
}
520520

521521
/**
522-
* Disables IDFA collecting
522+
* Disables IDFA collection in iOS and Advertising ID in Android
523523
* @param shouldDisable Flag to disable/enable IDFA collection
524-
* @platform iOS only
525524
*/
526-
appsFlyer.disableAdvertisingIdentifier = (shouldDisable) => {
527-
return RNAppsFlyer.disableAdvertisingIdentifier(shouldDisable);
525+
appsFlyer.disableAdvertisingIdentifier = (isDisable) => {
526+
return RNAppsFlyer.disableAdvertisingIdentifier(isDisable);
528527
}
529528

530529
/**

ios/AppsFlyerLib.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// AppsFlyerLib.h
33
// AppsFlyerLib
44
//
5-
// AppsFlyer iOS SDK 6.3.0 (11)
5+
// AppsFlyer iOS SDK 6.3.2 (17)
66
// Copyright (c) 2012-2020 AppsFlyer Ltd. All rights reserved.
77
//
88

ios/RNAppsFlyer.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ - (void)didResolveDeepLink:(AppsFlyerDeepLinkResult* _Nonnull) result {
301301
message[@"status"] = ([deepLinkStatus isEqual:@"Error"] || [deepLinkStatus isEqual:@"NOT_FOUND"]) ? afFailure : afSuccess;
302302
message[@"deepLinkStatus"] = deepLinkStatus;
303303
message[@"type"] = afOnDeepLinking;
304-
message[@"isDeffered"] = result.deepLink.isDeferred ? @YES : @NO;
304+
message[@"isDeferred"] = result.deepLink.isDeferred ? @YES : @NO;
305305
if([deepLinkStatus isEqual: @"Error"]){
306306
message[@"data"] = result.error.localizedDescription;
307307
}else if([deepLinkStatus isEqual: @"NOT_FOUND"]){

0 commit comments

Comments
 (0)