appsflyer-react-native-plugin icon indicating copy to clipboard operation
appsflyer-react-native-plugin copied to clipboard

Link not open view on iOS when app is in foreground

Open Darex1991 opened this issue 1 year ago • 2 comments

Report

Plugin Version

checked 6.4.40 and 6.8.0

On what Platform are you having the issue?

iOS

What did you do?

I just click the universal link.

What did you expect to happen?

Open the correct view.

What happened instead?

Nothing (just display app), onDeepLink was executed with correct params.

Screenshot 2022-10-07 at 10 29 23

Please provide any other relevant information.

On Android, it is working fine. When the app is killed link correctly starts the app with an opened view.


Flow works fine when instead of using

- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray * _Nullable))restorationHandler {
    [[AppsFlyerAttribution shared] continueUserActivity:userActivity restorationHandler:restorationHandler];
    return YES;
}

from documentation

I will use setup from RN Navigation documentation

// Add this inside `@implementation AppDelegate` above `@end`:
- (BOOL)application:(UIApplication *)application continueUserActivity:(nonnull NSUserActivity *)userActivity
 restorationHandler:(nonnull void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler
{
 return [RCTLinkingManager application:application
                  continueUserActivity:userActivity
                    restorationHandler:restorationHandler];
}

so there is problem with [[AppsFlyerAttribution shared]

Darex1991 avatar Oct 07 '22 14:10 Darex1991

👋 Hi @Darex1991 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 [email protected]. When submitting the ticket, please specify:

  • ✅ your AppsFlyer sign-up (account) email
  • ✅ app ID
  • ✅ production steps
  • ✅ logs
  • ✅ code snippets
  • ✅ and any additional relevant information.

github-actions[bot] avatar Oct 07 '22 19:10 github-actions[bot]

@Darex1991 are you trying to open a certain view after clicking on a link? AppsFlyerAttribution shared is responsible on triggering the onDeepLink method on the javascript side and not on redirecting to a specific screen or any other action. you need to do it on your own in the onDeepLink method

amit-kremer93 avatar Oct 20 '22 08:10 amit-kremer93

Yeah, now I know :) I talked with support about that and after a few days of chat, I've been informed about that. Thanks

Darex1991 avatar Oct 21 '22 09:10 Darex1991