Open lucasroca opened 3 years ago
Also problem, please fix this bag
Same problem here
Plugin 6.1.20 React Native 0.63.3
Appears only on iOS, on Android works as expected.
Hi @amit-kremer93, do you have any updates on this?
Did you follow this??
For now, you can use onInstallConversionData
listener to handle direct deep link in iOS by checking if
is_first_launch === false
. it's not the best solution but it will work until we figure it out
onInstallConversionData
is not enough to get all the params.
I had to downgrade to 6.0.50
to restore the behaviour :(
onInstallConversionData
is not enough to get all the params. I had to downgrade to6.0.50
to restore the behaviour :(
6.0.50 - does not handled when the app is turned on :( latest version - handled when app on, but not handled when start :(
can developers combine these 2 functions?
or maybe add in onInstallConversionData
all params?
@Goldyukol in which type of deep link do you use? URL scheme or universal link? 6.0.50 works fine for me when the app in the background and when fully closed
@amit-kremer93 how does it work for you ? we use appsflyer links
@Goldyukol in which type of deep link do you use? URL scheme or universal link? 6.0.50 works fine for me when the app in the background and when fully closed
In latest version this features doesn't work
Did you follow this?? For now, you can use
onInstallConversionData
listener to handle direct deep link in iOS by checking ifis_first_launch === false
. it's not the best solution but it will work until we figure it out
Yes, I've followed those steps. The issue still remains. As mentioned by @rborn, using onInstallConversionData
doesn't help much.
@Goldyukol in which type of deep link do you use? URL scheme or universal link? 6.0.50 works fine for me when the app in the background and when fully closed
I'm using universal links.
@amit-kremer93 like the rest of us here, definitely still happening on my end.
On relaunching the app, onAppOpenAttribution
doesn't happen, but if it was running in the background, direct deep links would successfully trigger it.
It seems like the issue started after the native SDK was upgraded and we are working on a solution. Sorry for the inconvenience.
I released a new version (6.1.40) with a fix for the onAppOpenAttribution in iOS. The implementation has slightly changed so please see this but the flow is the same. Please let us know here if there is any problem. thanks!
Those who are running into this might find https://github.com/AppsFlyerSDK/appsflyer-react-native-plugin/issues/223#issuecomment-768371228 useful.
Please let us know here if there is any problem.
@amit-kremer93 Yup, unfortunately, there is one.
I opened the app from the phone's email client. Then shortly after, the app crashed before it could even start logging anything to the JavaScript console. Here's the native log. ML.Debug
refers to my local app process.
default 12:17:28.772654+0800 ML.Debug [DEBUG] AppsFlyer: [HTTP]
Result: {
data = {length = 4, bytes = 0x226f6b22};
dataStr = "\"ok\"";
retries = 2;
statusCode = 200;
taskIdentifier = 3;
}
Error: (null)
default 12:17:28.772732+0800 ML.Debug [DEBUG] AppsFlyer: Loading conversion data
default 12:17:28.773572+0800 ML.Debug [DEBUG] AppsFlyer: [GCD-A02] -[RNAppsFlyer onConversionDataSuccess:]:
{
"af_message" = "organic install";
"af_status" = Organic;
"install_time" = "2021-01-18 04:06:20.689";
"is_first_launch" = 0;
}
default 12:17:28.775784+0800 ML.Debug [DEBUG] AppsFlyer: [CACHE] Deleting file: /var/mobile/Containers/Data/Application/1E631D5D-803D-4A15-8B56-FA65694DFF2D/Library/Caches/appsflyer-v1/632636244.2472.plist
default 12:17:28.775850+0800 ML.Debug [DEBUG] AppsFlyer: [HTTP] Dealloc. Time elapsed for: `160-1610943444.211549` - 3.944231986999512
default 12:18:09.942508+0800 ML.Debug *** Assertion failure in -[RCTEventEmitter sendEventWithName:body:](), /Users/csantarin/moneylion/mobile-app/node_modules/react-native/React/Modules/RCTEventEmitter.m:50
default 12:18:10.253181+0800 ML.Debug *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Error when sending event: onAttributionFailure with body: {"status":"failure","type":"onAttributionFailure","data":"Authentication Failed"}. Bridge is not set. This is probably because you've explicitly synthesized the bridge in RNAppsFlyer, even though it's inherited from RCTEventEmitter.'
*** First throw call stack:
(0x1853619d8 0x1996cab54 0x18527050c 0x1865b9238 0x1051ecf80 0x1058948a8 0x1058946c8 0x186657614 0x1852e1bf0 0x1852e1af0 0x1852e0e38 0x1852db3e0 0x1852daba0 0x19c018598 0x187bca3d8 0x187bcf958 0x104604564 0x184fb9568)
@csantarin {"status":"failure","type":"onAttributionFailure","data":"Authentication Failed"}
means that you have an issue with your devKey. about the crash, i released an hot fix.
@amit-kremer93 , I'm testing version 6.1.41
I already updated didFinishLaunchingWithOptions
.
@ amit-kremer93 , тестирую версию
6.1.41
- На Android: он работает в любом сценарии, когда приложение находится в фоновом режиме или когда оно полностью закрыто.
- На ios: не работает, если приложение полностью закрыто. Работает, если приложение находится в фоновом режиме.
Я уже обновился
didFinishLaunchingWithOptions
.
How you updated didFinishLaunchingWithOptions
?
Send code pls
How you updated
didFinishLaunchingWithOptions
?Send code pls
You can find it in the updated guide: https://github.com/AppsFlyerSDK/appsflyer-react-native-plugin/blob/master/Docs/Guides.md#import
if(_AppsFlyerdelegate == nil){
_AppsFlyerdelegate = [[RNAppsFlyer alloc] init];
}
[[AppsFlyerLib shared] setDelegate:_AppsFlyerdelegate];
@amit-kremer93 , I'm testing version
6.1.41
- On android: it works in either scenarios, when app is in background, or when it's fully closed.
- On ios: it doesn't work if app is fully closed. It works if app is in background.
I already updated
didFinishLaunchingWithOptions
.
[[FBSDKApplicationDelegate sharedInstance] application:application
didFinishLaunchingWithOptions:launchOptions];
added after?
if(_AppsFlyerdelegate == nil){
_AppsFlyerdelegate = [[RNAppsFlyer alloc] init];
}
[[AppsFlyerLib shared] setDelegate:_AppsFlyerdelegate];
I released a new version (6.1.40) with a fix for the onAppOpenAttribution in iOS. The implementation has slightly changed so please see this but the flow is the same. Please let us know here if there is any problem. thanks!
Problem is not resolved
Those who are running into this might find https://github.com/AppsFlyerSDK/appsflyer-react-native-plugin/issues/223#issuecomment-768371228 useful.
@Goldyukol not-maintainer here. On 6.1.41
, I imagine it should look like this on a brand new AppDelegate.m
:
#import <RNAppsFlyer.h>
#import <React/RCTLinkingManager.h>
#import <AppsFlyerLib/AppsFlyerLib.h>
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Flipper init here...
if(_AppsFlyerdelegate == nil){
_AppsFlyerdelegate = [[RNAppsFlyer alloc] init];
}
[[AppsFlyerLib shared] setDelegate:_AppsFlyerdelegate];
// React Native Bridge and Root View init here...
RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
RCTRootView *rootView = [[RCTRootView alloc]
initWithBridge:bridge
moduleName:@"FiftyViewsUnderTheAppiumSea"
initialProperties:nil
];
// More on React Native Bridge and Root View init here...
return YES;
}
Correct me if I'm wrong, @amit-kremer93. That's how I'm initializing the SDK on my end.
{"status":"failure","type":"onAttributionFailure","data":"Authentication Failed"}
means that you have an issue with your devKey. about the crash, i released an hot fix.
Right you are, @amit-kremer93. But I've followed the iOS SDK / RN plugin integration guide. The devKey
and appId
are correct. So, I don't get it. Why would I have this issue?
On my end, .initSdk(config)
is called right after subscribers, i.e. onInstallConversionData
, onAppOpenAttribution
, etc.
@amit-kremer93 we are also experiencing a similar issue. On the latest version of the plugin (6.1.41
) for iOS: if the app is fully closed, after tapping a onelink in the phones email client, the phone crashes with the following error
[DEBUG] AppsFlyer:
[Shortlink] OneLink:(null)
[Shortlink] Response Info:{
data = {length = 21, bytes = 0x41757468656e7469636174696f6e204661696c6564};
dataStr = "Authentication Failed";
retries = 0;
statusCode = 401;
taskIdentifier = 1;
}
[Shortlink] Error: Error Domain=com.appsflyer.sdk.serialize Code=61 "Authentication Failed" UserInfo={NSLocalizedDescription=Authentication Failed}
Everything is setup according to the docs and was not crashing before updating the plugin (although onDeepLink was not firing on iOS). I have made the recommended changes from the new readme to the AppDelegate.m
as well.
If the app is in the background, it works as expected i.e. the onDeepLink
handler is called and no crash.
Same here, if i open the app and then i use deep link it works, but when the app is completely closed does not work :(
@colaquecez @jwebcat @Goldyukol @haipham-kontist @lucasroca @Voidozzer @rborn
I found something with the help of their support team that might help you out.
react-native-appsflyer
6.1.41
AppsFlyerFramework
6.1.3
if(_AppsFlyerdelegate == nil){
_AppsFlyerdelegate = [[RNAppsFlyer alloc] init];
}
[[AppsFlyerLib shared] setDelegate:_AppsFlyerdelegate];
+ [AppsFlyerLib shared].appsFlyerDevKey = @"YOUR_APPSFLYER_DEV_KEY";
For the app I work with, this is sorely needed, on top of the initSdk()
params. This isn't mentioned in the docs, though.
@amit-kremer93 I feel like this is a hack, but it holds for the time being. Would it be possible to remedy this gotcha or at least make it known to everyone in the Init SDK guide?
@amit-kremer93 The crash that I mentioned in https://github.com/AppsFlyerSDK/appsflyer-react-native-plugin/issues/223#issuecomment-761987345 is no longer there. There was a remnant code lying about (from AppsFlyerFramework
4.10.x
days) in AppDelegate.m
> application:applicationDidBecomeActive
that had to be removed from our codebase as it was causing all of those crashes:
(void)applicationDidBecomeActive:(UIApplication *)application {
// Don't need the below.
- [[AppsFlyerLib shared] start];
@csantarin
I feel like this is a hack, but it holds for the time being. Would it be possible to remedy this gotcha or at least make it known to everyone in the Init SDK guide?
yes, you are right this is a workaround for now. it happened because of some improvements in the iOS SDK that launches faster than the plugin in react-native so we working on a long-term fix.
@csantarin thanks a lot for this. could you please explain where to put the code above? Because I don't have anything similar to this in my appdelegate 🤗
if(_AppsFlyerdelegate == nil){
_AppsFlyerdelegate = [[RNAppsFlyer alloc] init];
}
[[AppsFlyerLib shared] setDelegate:_AppsFlyerdelegate];
+ [AppsFlyerLib shared].appsFlyerDevKey = @"YOUR_APPSFLYER_DEV_KEY";
@rborn assuming latest React Native, in application:didFinishLaunchingWithOptions
:
AppDelegate.m
#import "AppDelegate.h"
#import <React/RCTBridge.h>
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
#import <React/RCTLinkingManager.h>
// AppsFlyer imports
#import <RNAppsFlyer.h>
#import <AppsFlyerLib/AppsFlyerLib.h>
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Flipper init here...
// AppsFlyer init here...
if(_AppsFlyerdelegate == nil){
_AppsFlyerdelegate = [[RNAppsFlyer alloc] init];
}
[[AppsFlyerLib shared] setDelegate:_AppsFlyerdelegate];
[AppsFlyerLib shared].appsFlyerDevKey = @"YOUR_APPSFLYER_DEV_KEY"; // HACK: iOS SDK is faster than RN plugin
// React Native Bridge and Root View init here...
RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
RCTRootView *rootView = [[RCTRootView alloc]
initWithBridge:bridge
moduleName:@"FiftyViewsUnderTheAppiumSea"
initialProperties:nil
];
// More on React Native Bridge and Root View init here...
return YES;
}
Like in https://github.com/AppsFlyerSDK/appsflyer-react-native-plugin/issues/223#issuecomment-762352475, except you now have:
[AppsFlyerLib shared].appsFlyerDevKey = @"YOUR_APPSFLYER_DEV_KEY";
It's also in the docs. Check it out.
@amit-kremer93 @rborn I have implemented the hacky workaround for plugin version 6.1.41
and now the onDeepLink
handler is called and the app no longer crashes. There seems to be a new issue introduced however, the onDeepLink
handler is not called intermittently both with the app fully closed and in the background. It works about 80% of the time. This makes me think perhaps a race condition is introduced with this latest workaround. This was tested on physical devices (iOS 13.1.2
and 14.4
) Is this happening for anyone else?
In the code below af_dp
replaced with xxx
onDeepLink
handler the native logs show:[DEBUG] AppsFlyer:
[Shortlink] OneLink:{
"af_dp" = "xxx";
"deep_link_value" = myProgram;
"media_source" = Email;
pid = Email;
}
[Shortlink] Response Info:{
data = {length = 90, bytes = 0x7b227069 64223a22 456d6169 6c222c22 ... 22456d61 696c227d };
dataStr = "{\"pid\":\"Email\",\"deep_link_value\":\"myProgram\",\"af_dp\":\"xxx\",\"media_source\":\"Email\"}";
retries = 0;
statusCode = 200;
taskIdentifier = 5;
}
[Shortlink] Error: (null)
followed by
[DEBUG] AppsFlyer: [GCD-A02] -[RNAppsFlyer onConversionDataSuccess:]:
{
"af_message" = "organic install";
"af_status" = Organic;
"install_time" = "2021-01-27 21:51:15.073";
"is_first_launch" = 0;
}
onDeepLink
handler, the native logs only show:[DEBUG] AppsFlyer:
[Shortlink] OneLink:{
"af_dp" = "xxx";
"deep_link_value" = myProgram;
"media_source" = Email;
pid = Email;
}
[Shortlink] Response Info:{
data = {length = 90, bytes = 0x7b227069 64223a22 456d6169 6c222c22 ... 22456d61 696c227d };
dataStr = "{\"pid\":\"Email\",\"deep_link_value\":\"myProgram\",\"af_dp\":\"xxx\",\"media_source\":\"Email\"}";
retries = 0;
statusCode = 200;
taskIdentifier = 5;
}
[Shortlink] Error: (null)
In this case [RNAppsFlyer onConversionDataSuccess:]:
is never called and it fails to call either the onInstallConversionData
or onDeepLink
handlers.
With the plugin version 6.1.20
it calls the onDeepLink
handler successfully every time you tap a Onelink when the app is in the foreground, but is not called when the app is fully closed.
I am also having this issue in version 6.1.41
. onDeepLink
is only called if the app is already open. I have tried everything above including the "hack" from @csantarin, and it still does not work.
I have tried on simulator and real device.
What else can I try?
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[Bugsnag start];
// Firebase
if ([FIRApp defaultApp] == nil) {
[FIRApp configure];
}
// AppsFlyer
if(_AppsFlyerdelegate == nil){
_AppsFlyerdelegate = [[RNAppsFlyer alloc] init];
}
[[AppsFlyerLib shared] setDelegate:_AppsFlyerdelegate];
[AppsFlyerLib shared].appsFlyerDevKey = [ReactNativeConfig envFor:@"APPSFLYER_DEV_KEY_IOS"];
// Enable Logging For Release Builds
// RCTSetLogThreshold(RCTLogLevelInfo - 1);
#ifdef FB_SONARKIT_ENABLED
InitializeFlipper(application);
#endif
RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge moduleName:@"pinna" initialProperties:nil];
rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
UIViewController *rootViewController = [UIViewController new];
rootViewController.view = rootView;
self.window.rootViewController = rootViewController;
[self.window makeKeyAndVisible];
return YES;
}
setup()
function run as soon as possible:static setup(handleAppsFlyerData) {
let appsFlyerOptions = {
devKey: APPSFLYER_DEV_KEY_IOS,
appId: APPSFLYER_APP_ID_IOS,
onInstallConversionDataListener: true,
onDeepLinkListener: true,
isDebug: true
};
if (handleAppsFlyerData) {
onDeepLinkCanceller = appsFlyer.onDeepLink(res => {
console.log('appsFlyer.onDeepLink', res);
handleAppsFlyerData(res.data);
});
onInstallConversionDataCanceller = appsFlyer.onInstallConversionData(
res => {
console.log('appsFlyer.onInstallConversionData', res);
if (
res &&
res.data &&
res.data.is_first_launch &&
JSON.parse(res.data.is_first_launch) == true
) {
handleAppsFlyerData(res.data);
}
}
);
}
if (Device.isIos) {
// Do not need to call this when using the AppsFlyer SDK with IDFA removed
// appsFlyer.disableAdvertisingIdentifier(true);
appsFlyer.disableCollectASA(true);
}
appsFlyer.initSdk(
appsFlyerOptions,
result => {
debug.log('appsFlyer.initSdk', result);
},
error => {
debug.log('appsFlyer.initSdk ERROR', error);
}
);
}
@jwebcat @curiousdustin if you want to use unified deep link instead of onAppOpenAttribution, try to replace
[[AppsFlyerLib shared] setDelegate:_AppsFlyerdelegate];
with [[AppsFlyerLib shared] setDeepLinkDelegate:_AppsFlyerdelegate]
@amit-kremer93 , that seems to have worked for me. Thanks!
You say replace. Is there any reason we should also keep the setDelegate
line as well?
@amit-kremer93 after implementing the following, there is no change:
@jwebcat @curiousdustin if you want to use unified deep link instead of onAppOpenAttribution, try to replace
[[AppsFlyerLib shared] setDelegate:_AppsFlyerdelegate];
with[[AppsFlyerLib shared] setDeepLinkDelegate:_AppsFlyerdelegate]
The same issue that I described persists (onDeepLink
only fires ~80% of the time both with the app in the background and fully closed.)
@curiousdustin it can cause conflicts with these two listeners. if you want to use onAppOpenAttribution
you must use setDelegate
and if you want to use onDeepLink
you must use setDeepLinkDelegate
.
@jwebcat it happens randomly? or in certain flows? all this issue began because of performance and timing problems in React-Native and iOS, so try to call
if(_AppsFlyerdelegate == nil){ _AppsFlyerdelegate = [[RNAppsFlyer alloc] init]; } [[AppsFlyerLib shared] setDeepLinkDelegate_AppsFlyerdelegate]; [AppsFlyerLib shared].appsFlyerDevKey = @"YOUR_APPSFLYER_DEV_KEY";
at the top of your didFinishLaunchingWithOptions
@amit-kremer93 I already tried moving it to the top of didFinishLaunchingWithOptions
and it doesn't make a difference.
With the previous version 6.1.20
the onDeepLink
fires 100% of the time with the app in the background. It fails to call onDeepLink
at all with the app fully closed.
With this version 6.1.41
onDeepLink
only fires about 70% of the time. The rest of the time it just opens the app. It seems to consistently fail to call onDeepLink
on the first press of a onelink. Sometimes it works several times, then fails to call onDeepLink
on the 3rd or 4th press of a onelink. It seems to fail as described for all scenarios / flows (app in the background and fully closed). This behavior for me points to a race condition of some sort, especially because in the previous version of the plugin it works as expected with the app in the background.
This issue is blocking our team from utilizing this feature. Any update on an actual fix would be much appreciated.
@amit-kremer93 any update on this? 🙏
@rborn this is fixed for us in plugin v6.2.10
. I haven't tried the latest version that was just released.
@rborn as @jwebcat wrote, this issue was fixed in v6.2.10
and also in the next releases
@amit-kremer93 @jwebcat thank you, will test today/tomorrow and let you know :)
@amit-kremer93 @jwebcat Ok, tested with "react-native-appsflyer": "6.2.31",
but the app still doesn't receive the deeplinks on cold start :( (ios)
@rborn please be sure you follow the new docs
I'm trying to implement Unified Deep Linking, but can't get onDeepLinking
to fire when I run xcrun simctl openurl booted https://mydomain.onelink.me/path/tolink
(which has a deep_link_value
set in the creation UI). Launching the app via the URL scheme, i.e xcrun simctl openurl booted myappscheme://test-deep-link
fires onAppOpenAttribution
with the correct data in, and onInstallConversionData
fires correctly too. I've been over the setup in the JS and Obj-C in AppDelegate.m multiple times and it all seems to be correct. I'm using the latest version of react-native-appsflyer (6.2.41) so I don't have any setDelegate
or setDeepLinkDelegate
. Here is the code I am using:
- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray * _Nullable))restorationHandler {
[[AppsFlyerAttribution shared] continueUserActivity:userActivity restorationHandler:restorationHandler];
return YES;
}
// Reports app open from deep link from apps which do not support Universal Links (Twitter) and for iOS8 and below
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString*)sourceApplication annotation:(id)annotation {
[[AppsFlyerAttribution shared] handleOpenUrl:url sourceApplication:sourceApplication annotation:annotation];
return YES;
}
// Reports app open from URL Scheme deep link for iOS 10
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url options:(NSDictionary *) options {
[[AppsFlyerAttribution shared] handleOpenUrl:url options:options];
return YES;
}
const onInstallConversionDataCanceller = (callback) =>
appsFlyer.onInstallConversionData(callback)
const onAppOpenAttributionCanceller = (callback) =>
appsFlyer.onAppOpenAttribution(callback)
const onDeepLinkCanceller = (callback) => appsFlyer.onDeepLink(callback)
appsFlyer.initSdk(
{
devKey: Config.APPSFLYER_DEV_KEY,
appId: <team id>,
isDebug: true,
onInstallConversionDataListener: true,
openDeepLinkListener: true,
},
(result) => {
console.log(`AppsFlyer initalised successfully: ${result}`)
},
(error) => {
console.log(`There was a problem initalising AppsFlyer: ${error}`)
}
)
(the callback
methods are passed in from another method. These shouldn't be a problem, for now they are just the standard ones in the docs). The init success callback fires successfully. Also this is only for iOS, I have yet to try Android.
@tomoakley please contact our support team: support@appsflyer.com
@tomoakley looks like in your appsFlyer.initSdk
options, you need change openDeepLinkListener: true
to be onDeepLinkListener: true
then it should work as expected.
@amit-kremer93 I did 😅 and it seems that all works now, I forgot some delegate from the older versions in AppDelegate.m Thanks for the help 😻
@tomoakley looks like in your
appsFlyer.initSdk
options, you need changeopenDeepLinkListener: true
to beonDeepLinkListener: true
then it should work as expected.
thanks @jwebcat! I've changed it, but onDeepLink
callback still isn't being called. I will contact the support team (unless anyone else spots anything).
update - I can now get onDeepLink
and onInstallConversionData
called for launches via the URL scheme e.g myapp://
but only onInstallConversionData
for launching via a OneLink, onDeepLink
callback does not get called.
I've updated to 6.2.41
and follow the docs. My initial problem is solved now. Thanks for the help!
@amit-kremer93 hello, "react-native-appsflyer": "^6.3.20", always fire onAppOpenAttribution method not called when ios app is fully closed
func application(
_ app: UIApplication,
open url: URL,
options: [UIApplication.OpenURLOptionsKey: Any] = [:]
) -> Bool {
AppsFlyerAttribution.shared().handleOpenUrl(url, options: options)
return RCTLinkingManager.application(app, open: url, options: options)
}
func application(
_ application: UIApplication,
continue userActivity: NSUserActivity,
restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void
) -> Bool {
AppsFlyerAttribution.shared().continueUserActivity(userActivity, restorationHandler: nil)
return RCTLinkingManager.application(application, continue: userActivity) { _ in }
}
func application(
_ application: UIApplication,
open url: URL,
sourceApplication: String?,
annotation: Any) -> Bool {
AppsFlyerAttribution.shared().handleOpenUrl(url, sourceApplication: sourceApplication, annotation: annotation)
return true
}
Plugin Version
6.1.20
On what Platform are you having the issue?
iOS
What did you do?
Installed the latest version of the plugin
What did you expect to happen?
onDeepLink to be called
What happened instead?
The handler wasn't triggered
Please provide any other relevant information.
On iOS, react-native-appsflyer version 6.1.10, when clicking a OneLink the app opens but
onAppOpenAttribution
is not triggered when the app is fully closed.Then I upgraded to react-native-appsflyer version 6.1.20 to test unified links. Again,
onDeepLink
works on every case except when the app is installed but fully closed and I open a OneLink.I tried both on simulator and real device with no luck.