You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 17, 2023. It is now read-only.
Repository navigation
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
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.
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.
@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.
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);});
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.
Activity
ShadananaK commentedon Aug 11, 2020
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
uxFeranmi commentedon Aug 12, 2020
@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.
uxFeranmi commentedon Aug 12, 2020
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
nomatchoccurence because the plugin's path matching function is called multiple times for each time you re-subscribe.AleCat83 commentedon Aug 13, 2020
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.
jpike88 commentedon Apr 19, 2021
observable method also isn't reliable (seems to only fire nomatch the first time, then subsequent tries fails)