Skip to content

Commit

Permalink
6.3.20
Browse files Browse the repository at this point in the history
6.3.20
  • Loading branch information
amit-kremer93 committed Jun 22, 2021
2 parents 1cedfa0 + c6b241a commit 854b694
Show file tree
Hide file tree
Showing 14 changed files with 62 additions and 89 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# Versions
## 6.3.20
- iOS SDK 6.3.2
- Android SDK 6.3.2
- Fix exception in UDL-android first launch callback parsing
- Add disableAdvertisingIdentifier api in android

## 6.3.0
- iOS SDK 6.3.0
- Android SDK 6.3.0
Expand Down
8 changes: 2 additions & 6 deletions Docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -741,21 +741,17 @@ appsFlyer.disableCollectASA(true);
---
##### <a id="disableAdvertisingIdentifier"> **`disableAdvertisingIdentifier(shouldDisable)`**
❗(iOS only)
Disables IDFA collecting
Disables IDFA collection in iOS and Advertising ID in Android. should be called before `initSdk`.
| parameter | type | description |
| ---------- |----------|------------------ |
| shouldDisable | boolean | Flag to disable/enable IDFA collection |
| isDisable | boolean | Flag to disable/enable IDFA/Advertising ID collection |
*Example:*
```javascript
if (Platform.OS == 'ios') {
appsFlyer.disableAdvertisingIdentifier(true);
}
```
---
Expand Down
50 changes: 23 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@

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

- iOS AppsFlyerSDK **v6.3.0**
- Android AppsFlyerSDK **v6.3.0**
- iOS AppsFlyerSDK **v6.3.2**
- Android AppsFlyerSDK **v6.3.2**

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

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

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

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)

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>
***Version <= 6.3.0:*** read this section of the README.md in branch: `releases/6.x.x/6.3.x/6.3.0`<br>
***Change to Strict mode***<br>
After you [installed](#installation) the AppsFlyer plugin, go to the `react-native-appsflyer` folder inside the `node_modules` folder:
```
cd node_modules/react-native-appsflyer
```
Run the script `changeMode.sh strict`
```
./changeMode.sh strict
After you [installed](#installation) the AppsFlyer plugin, add `$RNAppsFlyerStrictMode=true` in the project's Podfile:
```
Go to the `ios` folder in your `root` project
```
cd ../../ios
//MyRNApp/ios/Podfile
...
use_frameworks!
$RNAppsFlyerStrictMode=true
# Pods for MyRNApp
...
```
Run `pod install`
In the `ios` folder of your `root` project Run `pod install`

***Change to Regular mode***<br>
Go to the `react-native-appsflyer` folder inside the `node_modules` folder:
Remove `$RNAppsFlyerStrictMode=true` from the project's Podfile or set it to `false`:
```
cd node_modules/react-native-appsflyer
```
Run the script `changeMode.sh` (WITHOUT `strict`)
```
./changeMode.sh
```
Go to the `ios` folder in your `root` project
```
cd ../../ios
```
Run `pod install`
//MyRNApp/ios/Podfile
...
use_frameworks!
$RNAppsFlyerStrictMode=false //OR remove this line
# Pods for MyRNApp
...
```
In the `ios` folder of your `root` project Run `pod install`
## <a id="init-sdk"> 🚀 Initializing the SDK

Initialize the SDK to enable AppsFlyer to detect installations, sessions (app opens) and updates.<br>
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ repositories {
dependencies {
implementation "com.facebook.react:react-native:${safeExtGet('reactNativeVersion', '+')}"
implementation "com.android.installreferrer:installreferrer:${safeExtGet('installReferrerVersion', '2.1')}"
implementation "com.appsflyer:af-android-sdk:${safeExtGet('appsflyerVersion', '6.3.0')}"
implementation "com.appsflyer:af-android-sdk:${safeExtGet('appsflyerVersion', '6.3.2')}"
//-----
// Required -- JUnit 4 framework
testImplementation 'junit:junit:4.12'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,13 @@ public void onDeepLinking(@NonNull DeepLinkResult deepLinkResult) {
deepLinkObj.put("status", afSuccess);
deepLinkObj.put("deepLinkStatus", deepLinkResult.getStatus());
deepLinkObj.put("type", afOnDeepLinking);
deepLinkObj.put("data", deepLinkResult.getDeepLink().getClickEvent());
deepLinkObj.put("isDeferred", deepLinkResult.getDeepLink().isDeferred());
if (deepLinkResult.getStatus() == DeepLinkResult.Status.FOUND) {
deepLinkObj.put("data", deepLinkResult.getDeepLink().getClickEvent());
deepLinkObj.put("isDeferred", deepLinkResult.getDeepLink().isDeferred());
}else{
deepLinkObj.put("data", "");
deepLinkObj.put("isDeferred", "");
}
} catch (JSONException e) {
e.printStackTrace();
}
Expand Down Expand Up @@ -725,4 +730,9 @@ public void addPushNotificationDeepLinkPath(ReadableArray path, Callback success
errorCallback.invoke(e);
}
}

@ReactMethod
public void disableAdvertisingIdentifier(Boolean isDisabled) {
AppsFlyerLib.getInstance().setDisableAdvertisingIdentifiers(isDisabled);
}
}
7 changes: 0 additions & 7 deletions changeMode.sh

This file was deleted.

2 changes: 1 addition & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,11 @@ declare module "react-native-appsflyer" {
sendPushNotificationData(pushPayload: object): void
setHost(hostPrefix: string, hostName: string, success: SuccessCB): void
addPushNotificationDeepLinkPath(path: string[], successC: SuccessCB, errorC: ErrorCB): void
disableAdvertisingIdentifier(isDisable: boolean): void

/**
* For iOS Only
* */
disableAdvertisingIdentifier(shouldDisable: boolean): void
disableCollectASA(shouldDisable: boolean): void
setUseReceiptValidationSandbox(isSandbox: boolean): void
disableSKAD(disableSkad: boolean): void
Expand Down
7 changes: 3 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -519,12 +519,11 @@ appsFlyer.setSharingFilter = (partners, successC, errorC) => {
}

/**
* Disables IDFA collecting
* Disables IDFA collection in iOS and Advertising ID in Android
* @param shouldDisable Flag to disable/enable IDFA collection
* @platform iOS only
*/
appsFlyer.disableAdvertisingIdentifier = (shouldDisable) => {
return RNAppsFlyer.disableAdvertisingIdentifier(shouldDisable);
appsFlyer.disableAdvertisingIdentifier = (isDisable) => {
return RNAppsFlyer.disableAdvertisingIdentifier(isDisable);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion ios/AppsFlyerLib.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// AppsFlyerLib.h
// AppsFlyerLib
//
// AppsFlyer iOS SDK 6.3.0 (11)
// AppsFlyer iOS SDK 6.3.2 (17)
// Copyright (c) 2012-2020 AppsFlyer Ltd. All rights reserved.
//

Expand Down
2 changes: 1 addition & 1 deletion ios/RNAppsFlyer.m
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ - (void)didResolveDeepLink:(AppsFlyerDeepLinkResult* _Nonnull) result {
message[@"status"] = ([deepLinkStatus isEqual:@"Error"] || [deepLinkStatus isEqual:@"NOT_FOUND"]) ? afFailure : afSuccess;
message[@"deepLinkStatus"] = deepLinkStatus;
message[@"type"] = afOnDeepLinking;
message[@"isDeffered"] = result.deepLink.isDeferred ? @YES : @NO;
message[@"isDeferred"] = result.deepLink.isDeferred ? @YES : @NO;
if([deepLinkStatus isEqual: @"Error"]){
message[@"data"] = result.error.localizedDescription;
}else if([deepLinkStatus isEqual: @"NOT_FOUND"]){
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-appsflyer",
"version": "6.3.0",
"version": "6.3.20",
"description": "React Native Appsflyer plugin",
"main": "index.js",
"types": "index.d.ts",
Expand Down
18 changes: 0 additions & 18 deletions podspec-regular-template.txt

This file was deleted.

19 changes: 0 additions & 19 deletions podspec-strict-template.txt

This file was deleted.

12 changes: 11 additions & 1 deletion react-native-appsflyer.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,15 @@ Pod::Spec.new do |s|
s.platform = :ios, "8.0"
s.static_framework = true
s.dependency 'React'
s.dependency 'AppsFlyerFramework', ' 6.3.0'

# AppsFlyerFramework
if defined?($RNAppsFlyerStrictMode)
Pod::UI.puts "#{s.name}: Using AppsFlyerFramework/Strict mode"
s.dependency 'AppsFlyerFramework/Strict', '6.3.2'
s.xcconfig = {'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) AFSDK_NO_IDFA=1' }
else
Pod::UI.puts "#{s.name}: Using default AppsFlyerFramework.You may require App Tracking Transparency. Not allowed for Kids apps."
Pod::UI.puts "#{s.name}: You may set variable `$RNAppsFlyerStrictMode=true` in Podfile to use strict mode for kids apps."
s.dependency 'AppsFlyerFramework', ' 6.3.2'
end
end

0 comments on commit 854b694

Please sign in to comment.