AppsFlyerSDK / appsflyer-react-native-plugin

AppsFlyer plugin for React Native
MIT License
278 stars 198 forks source link

Link not open view on iOS when app is in foreground #429

Closed Darex1991 closed 1 year ago

Darex1991 commented 1 year ago

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]

github-actions[bot] commented 1 year ago

👋 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 support@appsflyer.com. When submitting the ticket, please specify:

amit-kremer93 commented 1 year ago

@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

Darex1991 commented 1 year ago

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