AppsFlyerSDK / appsflyer-react-native-plugin

AppsFlyer plugin for React Native
MIT License
284 stars 202 forks source link

appsFlyer.onDeepLink not being triggered in a specific case #544

Closed moatasemyakhni closed 7 months ago

moatasemyakhni commented 7 months ago

Report

Plugin Version

^6.12.2

On what Platform are you having the issue?

ℹ ios

What did you do?

ℹ I followed the tutorial on how to implement deeplink and universal links.

I added in AppDelegate.mm file

// Open URI-scheme for iOS 9 and above
 [[AppsFlyerAttribution shared] handleOpenUrl:url options:options];
 return YES;
  // Linking
 // return [RCTLinkingManager application:application openURL:url options:options];
}

- (BOOL)application:(UIApplication *)application continueUserActivity:(nonnull NSUserActivity *)userActivity
 restorationHandler:(nonnull void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler
{
  // Open Universal Links
  [[AppsFlyerAttribution shared] continueUserActivity:userActivity restorationHandler:restorationHandler];
  return YES;
  // Linking
 //return [RCTLinkingManager application:application
                  continueUserActivity:userActivity
                    restorationHandler:restorationHandler];
}

What did you expect to happen?

ℹ to get triggered normally.

What happened instead?

ℹ In every case the onDeepLink was working fine. However, if the app had been in the background for a long time (more than 30 min) and enter it again through a onelink link. The listener will not get triggered. Thus the app will do nothing, it will simply open.

Please provide any other relevant information.

ℹ if anyone want to test it without waiting the time to pass, you can change the time manually from your desktop, simulator, or real device. Go to settings -> date & time -> turn off "set time automatically" -> add 1 hour

run in the command line: xcrun simctl openurl booted "https://.onelink.me//?deep_link_value=HELLO"

The listener will not trigger

github-actions[bot] commented 7 months ago

👋 Hi @moatasemyakhni and Thank you for reaching out to us. In order for us to provide optimal support, please submit a ticket to our support team at support@appsflyer.com. When submitting the ticket, please specify: