ionic-team / ionic-plugin-deeplinks

Handle deeplinks into your Ionic/Cordova apps from Universal Links, App Links, and Custom URL schemes. For those using Ionic 2, there are some nice goodies that make life easier.
Other
333 stars 218 forks source link

Ionic 3.1 - No match breaks deep links - Android 6.x #105

Open claudiozam opened 7 years ago

claudiozam commented 7 years ago

Hi, thanks for your excellent plugin and your effort. When no match is found the error callback fires and something goes wrong inside ionic.native and the app then stops processing deep links.

https://github.com/driftyco/ionic-plugin-deeplinks/issues/78

Thanks!!

 let env = this;
 env.platform.ready().then(() => {
    env.deeplinks.route({
        '/posts/:postId/comments/:commentId': ViewPostPage,
        '/posts/:postId': ViewPostPage
    }).subscribe((match) => {
      env.util.logInfo('Deeplinks', 'match: ' + JSON.stringify(match));

    }, (nomatch) => {
      env.util.logError('Deeplinks', 'Error: ' + JSON.stringify(nomatch));
    });
});

match https://xxxx.handing.co/posts/8189

nomatch https://xxxx.handing.co/posts/8189/notes/3454

Cordova CLI: 6.5.0 
Ionic Framework Version: 3.1.0
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.3.4
ios-deploy version: 1.9.0 
ios-sim version: 5.0.12 
OS: macOS Sierra
Node Version: v7.6.0
Xcode version: Xcode 8.3.2 Build version 8E2002

package.json

  "dependencies": {
    "@angular/common": "4.0.2",
    "@angular/compiler": "4.0.2",
    "@angular/compiler-cli": "4.0.2",
    "@angular/core": "4.0.2",
    "@angular/forms": "4.0.2",
    "@angular/http": "4.0.2",
    "@angular/platform-browser": "4.0.2",
    "@angular/platform-browser-dynamic": "4.0.2",
    "@ionic-native/badge": "^3.2.2",
    "@ionic-native/calendar": "^3.1.1",
    "@ionic-native/core": "3.6.0",
    "@ionic-native/deeplinks": "^3.4.4",
    "@ionic-native/device": "^3.1.1",
    "@ionic-native/dialogs": "^3.4.4",
    "@ionic-native/facebook": "^3.1.1",
    "@ionic-native/file": "^3.1.1",
    "@ionic-native/google-analytics": "^3.2.2",
    "@ionic-native/google-plus": "^3.1.1",
    "@ionic-native/in-app-browser": "^3.1.1",
    "@ionic-native/keyboard": "^3.4.4",
    "@ionic-native/photo-viewer": "^3.1.1",
    "@ionic-native/push": "^3.1.1",
    "@ionic-native/safari-view-controller": "^3.1.1",
    "@ionic-native/social-sharing": "^3.1.1",
    "@ionic-native/spinner-dialog": "^3.1.1",
    "@ionic-native/splash-screen": "^3.1.1",
    "@ionic-native/status-bar": "^3.1.1",
    "@ionic-native/transfer": "^3.1.1",
    "@ionic/storage": "2.0.1",
    "angular-rollbar": "0.0.2",
    "angular2-elastic": "^0.13.0",
    "angular2-moment": "^1.2.0",
    "cordova-custom-config": "^3.1.2",
    "font-awesome": "^4.7.0",
    "fs-extra": "^2.1.2",
    "intl": "^1.2.5",
    "ionic-angular": "3.1.0",
    "ionic-image-loader": "^2.0.2",
    "ionic-img-viewer": "^2.1.0",
    "ionic2-calendar": "^0.3.1",
    "ionicons": "3.0.0",
    "onscreen": "^1.2.0",
    "rxjs": "5.1.1",
    "sw-toolbox": "3.4.0",
    "xmldom": "^0.1.27",
    "zone.js": "^0.8.5"
  },
  "devDependencies": {
    "@ionic/app-scripts": "1.3.4",
    "typescript": "~2.2.1"
  },
  "cordovaPlugins": [
    "cordova-plugin-whitelist",
    "cordova-plugin-console",
    "cordova-plugin-statusbar",
    "cordova-plugin-device",
    "cordova-plugin-splashscreen",
    "ionic-plugin-keyboard"
  ],
claudiozam commented 7 years ago

Now i use cordova universal links https://github.com/nordnet/cordova-universal-links-plugin (is working....)

mlynch commented 7 years ago

Reopening as it seems like a real bug, thanks for posting

plul commented 6 years ago

Once a well behaved Observable emits on either its error or complete channel, it will never emit again.

Therefore, for the plugin to go silent after it emits a No Match on its error channel, is the intended behavior of the RxJS subject that it uses.

I found it quite odd that the author of the plugin would do things this way, so I suspect the author has a lacking understanding of RxJS.

dmitriv2 commented 5 years ago

Duplicate of #77