镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content
This repository was archived by the owner on Aug 17, 2023. It is now read-only.
This repository was archived by the owner on Aug 17, 2023. It is now read-only.

click callbacks not always fired on IOS and ionic3 #232

Open

Description

@AleCat83

Hello,

I m using the plugin along with Ionic 3 and @ionic-native/deeplinks. I listen for deep link clicks using the method route. In most of the cases it works fine but sometimes the callback are not called. When this happen I can see in the logs the string "No Match found" or "Match found /XXXXX" but the callbacks (both next or error) that I set using subscribe are not called.
Digging a bit more I discovered that the log messages comes from the "www/deeplinks.js" file, so the js bridge receive the callbacks from the native layer but it is not passed to the subscribe callbacks.

Activity

  1. ShadananaK commented on Aug 11, 2020

    @ShadananaK

    Hi,

    Even I am facing exactly same issue when it comes to IOS app using ionic 3. Some time it works fine and some time get "No Match found" string as log randomly. Is there any solution or work around to this problem ? Please help.

    Regards,
    Shadanana

  2. uxFeranmi commented on Aug 12, 2020

    @uxFeranmi

    @AleCat83, @ShadananaK, this issue has also been reported here: #77. I found a workaround in that thread and there's also more explanation on why it happens.

  3. uxFeranmi commented on Aug 12, 2020

    @uxFeranmi

    This seems to work fine, using the plugin through the window object instead of the ionic-native wrapper. Better than re-subscribing to the observable after each nomatch occurence because the plugin's path matching function is called multiple times for each time you re-subscribe.

            window['IonicDeeplink'].route(this.Globals.Deeplinks,
                (match) => {
                    console.log('Deeplink path found!');
                    console.log(`Deeplink path found: ${JSON.stringify(match)}`);
    
                    navigate(match);
                }, (nomatch) => {
                    console.log('Deeplink path NOT found!');
                    console.log(`Deeplink path NOT found: ${JSON.stringify(nomatch)}`);
                    
                    navigate(nomatch);
                }
            );
  4. AleCat83 commented on Aug 13, 2020

    @AleCat83
    Author

    This seems to work fine, using the plugin through the window object instead of the ionic-native wrapper. Better than re-subscribing cute to the observable after each nomatch occurence because the plugin's path matching function is called multiple times for each time you re-subscribe.

            window['IonicDeeplink'].route(this.Globals.Deeplinks,
                (match) => {
                    console.log('Deeplink path found!');
                    console.log(`Deeplink path found: ${JSON.stringify(match)}`);
    
                    navigate(match);
                }, (nomatch) => {
                    console.log('Deeplink path NOT found!');
                    console.log(`Deeplink path NOT found: ${JSON.stringify(nomatch)}`);
                    
                    navigate(nomatch);
                }
            );

    Thanks, this workaround works for me, and I agree that it's better than recreate the observable on error as it may lead to memory leaks.

  5. jpike88 commented on Apr 19, 2021

    @jpike88

    observable method also isn't reliable (seems to only fire nomatch the first time, then subsequent tries fails)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions