diff --git a/.github/workflows/deploy-to-QA.yml b/.github/workflows/deploy-to-QA.yml
index 08558d63..88d2191b 100644
--- a/.github/workflows/deploy-to-QA.yml
+++ b/.github/workflows/deploy-to-QA.yml
@@ -23,7 +23,7 @@ jobs:
BRANCH_NAME: ${{github.ref_name}}
run: |
fixed_version_found=false
- plugin_version=$(echo "$BRANCH_NAME" | grep -Eo '[0-9].[0-9].[0-9]+')
+ plugin_version=$(echo "$BRANCH_NAME" | grep -Eo '[0-9].[0-9]+.[0-9]+')
jira_fixed_version="React Native SDK v$plugin_version"
# echo "PLUGIN_VERSION=$plugin_version" >> $GITHUB_ENV
echo "JIRA_FIXED_VERSION=$jira_fixed_version" >> $GITHUB_ENV
@@ -32,7 +32,7 @@ jobs:
- name: Update package.json file
run: |
- plugin_rc_version=$(echo "${{github.ref_name}}" | grep -Eo '[0-9].[0-9].[0-9]+-rc[0-9]+')
+ plugin_rc_version=$(echo "${{github.ref_name}}" | grep -Eo '[0-9].[0-9]+.[0-9]+-rc[0-9]+')
echo "Updating plugin to version $plugin_rc_version"
npm version $plugin_rc_version
git push
@@ -48,7 +48,7 @@ jobs:
env:
SLACK_TOKEN: ${{ secrets.CI_SLACK_TOKEN }}
run: |
- ios_sdk_version=$(cat README.md | grep 'iOS AppsFlyer SDK \*\*v[0-9].[0-9].[0-9]\*\*')
- android_sdk_version=$(cat README.md | grep 'Android AppsFlyer SDK \*\*v[0-9].[0-9].[0-9]\*\*')
+ ios_sdk_version=$(cat README.md | grep 'iOS AppsFlyer SDK' | grep -Eo '[0-9].[0-9]+.[0-9]')
+ android_sdk_version=$(cat README.md | grep 'Android AppsFlyer SDK' | grep -Eo '[0-9].[0-9]+.[0-9]')
CHANGES=$(cat "${{env.JIRA_FIXED_VERSION}}-releasenotes".txt)
curl -X POST -H 'Content-type: application/json' --data '{"jira_fixed_version": "'"${{env.JIRA_FIXED_VERSION}}"'", "deploy_type": "QA", "install_tag": "QA", "git_branch": "'"${{github.ref_name}}"'", "changes_and_fixes": "'"$CHANGES"'", "android_dependencie": "'"$android_sdk_version"'", "ios_dependencie": "'"$ios_sdk_version"'"}' "$SLACK_TOKEN"
diff --git a/.github/workflows/pre-release-workflow.yml b/.github/workflows/pre-release-workflow.yml
index 2af12b93..12340816 100644
--- a/.github/workflows/pre-release-workflow.yml
+++ b/.github/workflows/pre-release-workflow.yml
@@ -27,7 +27,7 @@ jobs:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Update package.json file
run: |
- plugin_version=$(echo "${{ steps.vars.outputs.branch }}" | grep -Eo '[0-9].[0-9].[0-9]+')
+ plugin_version=$(echo "${{ steps.vars.outputs.branch }}" | grep -Eo '[0-9].[0-9]+.[0-9]+')
# we export plugin_version and release branch name as env so we can use them in the next step
echo "PLUGIN_VERSION=$plugin_version" >> $GITHUB_ENV
echo "GIT_BRANCH_RELEASE=${{ steps.vars.outputs.branch }}" >> $GITHUB_ENV
diff --git a/.github/workflows/release-Production-workflow.yml b/.github/workflows/release-Production-workflow.yml
index 042cd01f..c7464422 100644
--- a/.github/workflows/release-Production-workflow.yml
+++ b/.github/workflows/release-Production-workflow.yml
@@ -31,7 +31,7 @@ jobs:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Determine release tag and release branch
run: |
- TAG=$(echo "${{ steps.vars.outputs.branch }}" | grep -Eo '[0-9].[0-9].[0-9]+')
+ TAG=$(echo "${{ steps.vars.outputs.branch }}" | grep -Eo '[0-9].[0-9]+.[0-9]+')
echo "PLUGIN_VERSION=$TAG" >> $GITHUB_ENV
echo "RELEASE_BRANCH_NAME=${{ steps.vars.outputs.branch }}" >> $GITHUB_ENV
echo "push new release >> $TAG"
@@ -74,7 +74,7 @@ jobs:
run: |
chmod +x .github/workflows/scripts/releaseNotesGenerator.sh
.github/workflows/scripts/releaseNotesGenerator.sh $JIRA_TOKEN "$JIRA_FIXED_VERSION"
- ios_sdk_version=$(cat README.md | grep 'iOS AppsFlyer SDK \*\*v[0-9].[0-9].[0-9]\*\*')
- android_sdk_version=$(cat README.md | grep 'Android AppsFlyer SDK \*\*v[0-9].[0-9].[0-9]\*\*')
+ ios_sdk_version=$(cat README.md | grep 'iOS AppsFlyer SDK' | grep -Eo '[0-9].[0-9]+.[0-9]')
+ android_sdk_version=$(cat README.md | grep 'Android AppsFlyer SDK' | grep -Eo '[0-9].[0-9]+.[0-9]')
CHANGES=$(cat "$JIRA_FIXED_VERSION-releasenotes".txt)
curl -X POST -H 'Content-type: application/json' --data '{"jira_fixed_version": "'"${{env.JIRA_FIXED_VERSION}}"'", "deploy_type": "Production", "install_tag": "latest", "git_branch": "'"$RELEASE_BRACH_NAME"'", "changes_and_fixes": "'"$CHANGES"'", "android_dependencie": "'"$android_sdk_version"'", "ios_dependencie": "'"$ios_sdk_version"'"}' "$SLACK_TOKEN"
diff --git a/.github/workflows/release-QA-workflow.yml b/.github/workflows/release-QA-workflow.yml
index cdf70685..84bfa9d2 100644
--- a/.github/workflows/release-QA-workflow.yml
+++ b/.github/workflows/release-QA-workflow.yml
@@ -3,7 +3,7 @@ name: Release plugin to QA
on:
push:
branches:
- - releases/[0-9].x.x/[0-9].[0-9].x/[0-9].[0-9].[0-9]+-rc[0-9]+
+ - releases/[0-9].x.x/[0-9].[0-9]+.x/[0-9].[0-9]+.[0-9]+-rc[0-9]+
jobs:
Run-Unit-Tests:
diff --git a/.github/workflows/scripts/releaseNotesGenerator.sh b/.github/workflows/scripts/releaseNotesGenerator.sh
index 2c0f5897..92a976ab 100755
--- a/.github/workflows/scripts/releaseNotesGenerator.sh
+++ b/.github/workflows/scripts/releaseNotesGenerator.sh
@@ -2,12 +2,12 @@ JIRA_TOKEN=$1
JIRA_FIXED_VERSION=$2
fixed_version_found=false
-curl -X GET -H "Authorization: Basic $JIRA_TOKEN=" https://appsflyer.atlassian.net/rest/api/3/project/11723/versions | jq -r '.[] | .name+""+.id' | while read version ; do
+curl -X GET https://appsflyer.atlassian.net/rest/api/3/project/11723/versions --user $JIRA_TOKEN | jq -r '.[] | .name+""+.id' | while read version ; do
if [[ "$version" == *"$JIRA_FIXED_VERSION"* ]] ;then
echo "$JIRA_FIXED_VERSION Found!"
fixed_version_found=true
version_id=${version#"$JIRA_FIXED_VERSION"}
- echo $(curl -X GET -H "Authorization: Basic $JIRA_TOKEN=" https://appsflyer.atlassian.net/rest/api/3/search?jql=fixVersion=$version_id | jq -r '.issues[] | "- " + .fields["summary"]+"@"') > "$JIRA_FIXED_VERSION-releasenotes".txt
+ echo $(curl -X GET https://appsflyer.atlassian.net/rest/api/3/search?jql=fixVersion=$version_id --user $JIRA_TOKEN | jq -r '.issues[] | "- " + .fields["summary"]+"@"') > "$JIRA_FIXED_VERSION-releasenotes".txt
sed -i -r -e "s/@ /\n/gi" "$JIRA_FIXED_VERSION-releasenotes".txt
sed -i -r -e "s/@/\n/gi" "$JIRA_FIXED_VERSION-releasenotes".txt
cat "$JIRA_FIXED_VERSION-releasenotes".txt
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 385ee786..1d08439c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,9 @@
+## 6.10.2
+ Release date: *2023-04-03*
+
+- Update Android SDK to v6.10.2
+- Update iOS SDK to v6.10.1
+
## 6.9.4
Release date: *2022-12-27*
diff --git a/Docs/DeepLink.md b/Docs/DeepLink.md
index 0d473fcf..b014045a 100644
--- a/Docs/DeepLink.md
+++ b/Docs/DeepLink.md
@@ -18,11 +18,9 @@ Since users may or may not have the mobile app installed, there are 3 types of d
2. Direct Deep Linking - Directly serving personalized content to existing users, which already have the mobile app installed.
3. Starting from v6.1.3, the new Unified Deep Linking API is available to handle deeplinking logic.
-For more info please check out the [OneLink™ Deep Linking Guide](https://support.appsflyer.com/hc/en-us/articles/208874366-OneLink-Deep-Linking-Guide#Intro).
-
### 1. Deferred Deep Linking (Get Conversion Data)
-Check out the deferred deeplinkg guide from the AppFlyer knowledge base [here](https://support.appsflyer.com/hc/en-us/articles/207032096-Accessing-AppsFlyer-Attribution-Conversion-Data-from-the-SDK-Deferred-Deeplinking-#Introduction).
+Check out the deferred deeplinkg guide from the AppFlyer knowledge base [here](https://dev.appsflyer.com/hc/docs/dl_work_flow).
Code Sample to handle the conversion data:
@@ -60,7 +58,7 @@ The `appsFlyer.onInstallConversionData` returns function to unregister this eve
### 2. Direct Deeplinking
-When a deeplink is clicked on the device the AppsFlyer SDK will return the resolved link in the [onAppOpenAttribution](https://support.appsflyer.com/hc/en-us/articles/208874366-OneLink-Deep-Linking-Guide#deep-linking-data-the-onappopenattribution-method-) method.
+When a deeplink is clicked on the device the AppsFlyer SDK will return the resolved link in the onAppOpenAttribution method.([Android](https://dev.appsflyer.com/hc/docs/dl_android_gcd_legacy) / [iOS](https://dev.appsflyer.com/hc/docs/dl_ios_gcd_legacy))
Code Sample to handle OnAppOpenAttribution:
@@ -191,12 +189,13 @@ For more on App Links check out the guide [here](https://dev.appsflyer.com/hc/do
### iOS Deeplink Setup
-In order to record retargeting and use the onAppOpenAttribution/UDL callbacks in iOS, the developer needs to pass the User Activity / URL to our SDK, via the following methods in the **AppDelegate.m** file:
+In order to record retargeting and use the onAppOpenAttribution/UDL callbacks in iOS, the developer needs to pass the User Activity / URL to our SDK.
+First, import the plugin in the **AppDelegate.m** file or in your **bridging header if you are using Swift**:
-#### import
```objectivec
#import
```
+For Objective-c projects: add the following to you **AppDelegate.m**
```objectivec
// Deep linking
// Open URI-scheme for iOS 9 and above
@@ -215,6 +214,23 @@ In order to record retargeting and use the onAppOpenAttribution/UDL callbacks in
return YES;
}
```
+For Swift projects: add the following to you **AppDelegate.swift**
+```swift
+ func application(_ application: UIApplication, handleOpen url: URL) -> Bool {
+ AppsFlyerAttribution.shared().handleOpen(url)
+ return true
+ }
+
+ func application(_ application: UIApplication, open url: URL, sourceApplication: String?, annotation: Any) -> Bool {
+ AppsFlyerAttribution.shared().handleOpen(url, sourceApplication: sourceApplication, annotation: annotation)
+ return true
+ }
+
+ func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
+ AppsFlyerAttribution.shared().continue(userActivity)
+ return true
+ }
+```
#### Universal Links
Universal Links link between an iOS mobile app and an associate website/domain, such as AppsFlyer’s OneLink domain (xxx.onelink.me). To do so, it is required to:
diff --git a/README.md b/README.md
index 3094ee85..6a090b6b 100644
--- a/README.md
+++ b/README.md
@@ -13,8 +13,8 @@
### This plugin is built for
-- Android AppsFlyer SDK **v6.9.4**
-- iOS AppsFlyer SDK **v6.9.1**
+- Android AppsFlyer SDK **v6.10.2**
+- iOS AppsFlyer SDK **v6.10.1**
## ❗❗ Breaking changes when updating to v6.x.x❗❗
diff --git a/android/build.gradle b/android/build.gradle
index d42a44c7..926a2633 100755
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -54,5 +54,5 @@ repositories {
dependencies {
implementation "com.facebook.react:react-native:${safeExtGet('reactNativeVersion', '+')}"
implementation "com.android.installreferrer:installreferrer:${safeExtGet('installReferrerVersion', '2.1')}"
- api "com.appsflyer:af-android-sdk:${safeExtGet('appsflyerVersion', '6.9.4')}"
+ api "com.appsflyer:af-android-sdk:${safeExtGet('appsflyerVersion', '6.10.2')}"
}
diff --git a/android/src/main/java/com/appsflyer/reactnative/RNAppsFlyerConstants.java b/android/src/main/java/com/appsflyer/reactnative/RNAppsFlyerConstants.java
index 973d6f23..eb3f524b 100755
--- a/android/src/main/java/com/appsflyer/reactnative/RNAppsFlyerConstants.java
+++ b/android/src/main/java/com/appsflyer/reactnative/RNAppsFlyerConstants.java
@@ -6,6 +6,7 @@
public class RNAppsFlyerConstants {
+ final static String PLUGIN_VERSION = "6.10.2";
final static String NO_DEVKEY_FOUND = "No 'devKey' found or its empty";
final static String UNKNOWN_ERROR = "AF Unknown Error";
final static String SUCCESS = "Success";
diff --git a/android/src/main/java/com/appsflyer/reactnative/RNAppsFlyerModule.java b/android/src/main/java/com/appsflyer/reactnative/RNAppsFlyerModule.java
index 82264b99..c607a1a5 100755
--- a/android/src/main/java/com/appsflyer/reactnative/RNAppsFlyerModule.java
+++ b/android/src/main/java/com/appsflyer/reactnative/RNAppsFlyerModule.java
@@ -19,6 +19,8 @@
import com.appsflyer.AppsFlyerConversionListener;
import com.appsflyer.AppsFlyerLib;
import com.appsflyer.AppsFlyerProperties.EmailsCryptType;
+import com.appsflyer.internal.platform_extension.Plugin;
+import com.appsflyer.internal.platform_extension.PluginInfo;
import com.appsflyer.share.CrossPromotionHelper;
import com.appsflyer.share.LinkGenerator;
import com.appsflyer.share.ShareInviteHelper;
@@ -150,6 +152,10 @@ private String callSdkInternal(ReadableMap _options) {
isDeepLinking = options.optBoolean(afDeepLink, false);
isManualStartMode = options.optBoolean("manualStart", false);
+ boolean isExpoApp = this.isExpoApp();
+ PluginInfo pluginInfo = new PluginInfo(isExpoApp ? Plugin.EXPO : Plugin.REACT_NATIVE, PLUGIN_VERSION);
+ instance.setPluginInfo(pluginInfo);
+
instance.init(devKey, (isConversionData == true) ? registerConversionListener() : null, application.getApplicationContext());
if (isDeepLinking) {
instance.subscribeForDeepLink(registerDeepLinkListener());
@@ -161,6 +167,22 @@ private String callSdkInternal(ReadableMap _options) {
return null;
}
+ /**
+ * We try to load this class which is associated with Expo. If the class is loaded we return true
+ * so we handle this app as an Expo app. If not its just a React Native app.
+ * @return true if its an Expo app, false is its React Native app
+ */
+ private boolean isExpoApp() {
+ try {
+ Class.forName("expo.modules.devmenu.react.DevMenuAwareReactActivity");
+ return true;
+ } catch (ClassNotFoundException e) {
+ return false;
+ } catch (Exception e) {
+ return false;
+ }
+ }
+
private DeepLinkListener registerDeepLinkListener() {
return new DeepLinkListener() {
@Override
diff --git a/index.d.ts b/index.d.ts
index 793c131b..6608d35f 100644
--- a/index.d.ts
+++ b/index.d.ts
@@ -3,8 +3,8 @@
**/
declare module "react-native-appsflyer" {
type Response = void | Promise;
- type SuccessCB = (result?: any) => any;
- type ErrorCB = (error?: any) => any;
+ type SuccessCB = (result?: unknown) => unknown;
+ type ErrorCB = (error?: Error) => unknown;
export type ConversionData = {
status: "success" | "failure",
type: "onInstallConversionDataLoaded" | "onInstallConversionFailure"
@@ -102,9 +102,15 @@ declare module "react-native-appsflyer" {
channel: string;
campaign?: string;
customerID?: string;
- userParams?: object;
-
- [key: string]: any;
+ userParams?: {
+ deep_link_value?: string;
+ [key: string]: any;
+ };
+ referrerName?: string;
+ referrerImageUrl?: string;
+ deeplinkPath?: string;
+ baseDeeplink?: string;
+ brandDomain?: string;
}
const appsFlyer: {
diff --git a/ios/AppsFlyerAttribution.h b/ios/AppsFlyerAttribution.h
index d46dbbd7..48212bf4 100644
--- a/ios/AppsFlyerAttribution.h
+++ b/ios/AppsFlyerAttribution.h
@@ -7,7 +7,6 @@
#ifndef AppsFlyerAttribution_h
#define AppsFlyerAttribution_h
#endif /* AppsFlyerAttribution_h */
-#import "AppsFlyerLib.h"
@interface AppsFlyerAttribution : NSObject
@property BOOL RNAFBridgeReady;
diff --git a/ios/AppsFlyerAttribution.m b/ios/AppsFlyerAttribution.m
index c9bfe8ed..07a46ee7 100644
--- a/ios/AppsFlyerAttribution.m
+++ b/ios/AppsFlyerAttribution.m
@@ -7,6 +7,7 @@
#import
#import "AppsFlyerAttribution.h"
+#import
@interface AppsFlyerAttribution ()
@property NSUserActivity * userActivity;
diff --git a/ios/AppsFlyerLib.h b/ios/AppsFlyerLib.h
index 4d86f52e..0b900a92 100644
--- a/ios/AppsFlyerLib.h
+++ b/ios/AppsFlyerLib.h
@@ -2,16 +2,16 @@
// AppsFlyerLib.h
// AppsFlyerLib
//
-// AppsFlyer iOS SDK 6.5.4 (62)
-// Copyright (c) 2012-2020 AppsFlyer Ltd. All rights reserved.
+// AppsFlyer iOS SDK 6.10.1 (109)
+// Copyright (c) 2012-2023 AppsFlyer Ltd. All rights reserved.
//
#import
-#import "AppsFlyerCrossPromotionHelper.h"
-#import "AppsFlyerShareInviteHelper.h"
-#import "AppsFlyerDeepLinkResult.h"
-#import "AppsFlyerDeepLink.h"
+#import
+#import
+#import
+#import
NS_ASSUME_NONNULL_BEGIN
@@ -131,18 +131,36 @@ NS_ASSUME_NONNULL_BEGIN
#define AFEventParamAdRevenueAdSize @"af_adrev_ad_size"
#define AFEventParamAdRevenueMediatedNetworkName @"af_adrev_mediated_network_name"
+
/// Mail hashing type
typedef enum {
/// None
EmailCryptTypeNone = 0,
- /// SHA1
- EmailCryptTypeSHA1 = 1,
- /// MD5
- EmailCryptTypeMD5 = 2,
/// SHA256
EmailCryptTypeSHA256 = 3
} EmailCryptType;
+typedef NS_CLOSED_ENUM (NSInteger ,AFSDKPlugin) {
+ AFSDKPluginIOSNative,
+ AFSDKPluginUnity,
+ AFSDKPluginFlutter,
+ AFSDKPluginReactNative,
+ AFSDKPluginAdobeAir,
+ AFSDKPluginAdobeMobile,
+ AFSDKPluginCocos2dx,
+ AFSDKPluginCordova,
+ AFSDKPluginMparticle,
+ AFSDKPluginNativeScript,
+ AFSDKPluginExpo,
+ AFSDKPluginUnreal,
+ AFSDKPluginXamarin,
+ AFSDKPluginCapacitor,
+ AFSDKPluginSegment,
+ AFSDKPluginAdobeSwiftAEP
+} NS_SWIFT_NAME(Plugin);
+
+@class AFSDKPluginInfo;
+
NS_SWIFT_NAME(DeepLinkDelegate)
@protocol AppsFlyerDeepLinkDelegate
@@ -212,6 +230,9 @@ NS_SWIFT_NAME(DeepLinkDelegate)
*/
+ (AppsFlyerLib *)shared;
+
+- (void)setUpInteroperabilityObject:(id)object;
+
/**
In case you use your own user ID in your app, you can set this property to that ID.
Enables you to cross-reference your own unique ID with AppsFlyer’s unique ID and the other devices’ IDs
@@ -298,6 +319,9 @@ NS_SWIFT_NAME(waitForATTUserAuthorization(timeoutInterval:));
*/
@property(atomic) BOOL disableCollectASA;
+/**
+ Disable Apple Ads Attribution API +[AAAtribution attributionTokenWithError:]
+ */
@property(nonatomic) BOOL disableAppleAdsAttribution;
/**
@@ -368,6 +392,11 @@ NS_SWIFT_NAME(waitForATTUserAuthorization(timeoutInterval:));
*/
@property(nonatomic, nullable) NSString *currentDeviceLanguage;
+/**
+ Internal API. Please don't use.
+ */
+- (void)setPluginInfoWith:(AFSDKPlugin)plugin pluginVersion:(NSString *)version additionalParams:(NSDictionary * _Nullable)additionalParams
+NS_SWIFT_NAME(setPluginInfo(plugin:version:additionalParams:));
/**
Enable the collection of Facebook Deferred AppLinks
Requires Facebook SDK and Facebook app on target/client device.
diff --git a/ios/AppsFlyerShareInviteHelper.h b/ios/AppsFlyerShareInviteHelper.h
index 715c14ab..f55dbf9d 100644
--- a/ios/AppsFlyerShareInviteHelper.h
+++ b/ios/AppsFlyerShareInviteHelper.h
@@ -7,7 +7,7 @@
//
#import
-#import "AppsFlyerLinkGenerator.h"
+#import
/**
AppsFlyerShareInviteHelper
diff --git a/ios/RNAppsFlyer.h b/ios/RNAppsFlyer.h
index 143c38bd..39237df6 100755
--- a/ios/RNAppsFlyer.h
+++ b/ios/RNAppsFlyer.h
@@ -10,11 +10,11 @@
#import "AppsFlyerAttribution.h"
#import
-//#if __has_include() // from Pod
-//#import
-//#else
-//#import "AppsFlyerLib.h"
-//#endif
+#if __has_include() // from Pod
+#import
+#else
+#import "AppsFlyerLib.h"
+#endif
@interface RNAppsFlyer: RCTEventEmitter
@@ -22,6 +22,7 @@
@end
+static NSString *const kAppsFlyerPluginVersion = @"6.10.2";
static NSString *const NO_DEVKEY_FOUND = @"No 'devKey' found or its empty";
static NSString *const NO_APPID_FOUND = @"No 'appId' found or its empty";
static NSString *const NO_EVENT_NAME_FOUND = @"No 'eventName' found or its empty";
diff --git a/ios/RNAppsFlyer.m b/ios/RNAppsFlyer.m
index 7014fcdb..284c31e9 100755
--- a/ios/RNAppsFlyer.m
+++ b/ios/RNAppsFlyer.m
@@ -1,4 +1,5 @@
#import "RNAppsFlyer.h"
+#import "AppsFlyerAttribution.h"
@implementation RNAppsFlyer
@synthesize bridge = _bridge;
@@ -94,6 +95,11 @@ -(NSError *) callSdkInternal:(NSDictionary*)initSdkOptions {
[[AppsFlyerLib shared] waitForATTUserAuthorizationWithTimeoutInterval:timeoutInterval];
}
#endif
+ BOOL isExpoApp = [self isExpoApp];
+ [[AppsFlyerLib shared] setPluginInfoWith:isExpoApp ? AFSDKPluginExpo : AFSDKPluginReactNative
+ pluginVersion:kAppsFlyerPluginVersion
+ additionalParams:nil];
+
[AppsFlyerLib shared].appleAppID = appId;
[AppsFlyerLib shared].appsFlyerDevKey = devKey;
[AppsFlyerLib shared].isDebug = isDebug;
@@ -191,12 +197,6 @@ -(NSError *) callSdkInternal:(NSDictionary*)initSdkOptions {
int _t = [emailsCryptTypeId intValue];
switch (_t) {
- case EmailCryptTypeSHA1:
- emailsCryptType = EmailCryptTypeSHA1;
- break;
- case EmailCryptTypeMD5:
- emailsCryptType = EmailCryptTypeMD5;
- break;
case EmailCryptTypeSHA256:
emailsCryptType = EmailCryptTypeSHA256;
break;
@@ -424,6 +424,10 @@ -(void) reportOnSuccess:(NSString *)data type:(NSString*) type {
}
}
+- (BOOL)isExpoApp {
+ return NSClassFromString(@"EXAppDelegateWrapper") != nil;
+}
+
RCT_EXPORT_METHOD(anonymizeUser: (BOOL *)b callback:(RCTResponseSenderBlock)callback) {
[AppsFlyerLib shared].anonymizeUser = b;
callback(@[SUCCESS]);
diff --git a/package.json b/package.json
index f898fe48..58e78638 100755
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "react-native-appsflyer",
- "version": "6.9.4",
+ "version": "6.10.2",
"description": "React Native Appsflyer plugin",
"main": "index.js",
"types": "index.d.ts",
@@ -55,8 +55,5 @@
"setupFiles": [
"/__tests__/setup.js"
]
- },
- "peerDependencies": {
- "expo": "*"
}
}
diff --git a/react-native-appsflyer.podspec b/react-native-appsflyer.podspec
index 0947068a..d2f6642c 100644
--- a/react-native-appsflyer.podspec
+++ b/react-native-appsflyer.podspec
@@ -18,13 +18,13 @@ Pod::Spec.new do |s|
# AppsFlyerFramework
if defined?($RNAppsFlyerStrictMode) && ($RNAppsFlyerStrictMode == true)
Pod::UI.puts "#{s.name}: Using AppsFlyerFramework/Strict mode"
- s.dependency 'AppsFlyerFramework/Strict', '6.9.1'
+ s.dependency 'AppsFlyerFramework/Strict', '6.10.1'
s.xcconfig = {'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) AFSDK_NO_IDFA=1' }
else
if !defined?($RNAppsFlyerStrictMode)
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."
end
- s.dependency 'AppsFlyerFramework', '6.9.1'
+ s.dependency 'AppsFlyerFramework', '6.10.1'
end
end