hypery2k / nativescript-urlhandler

NativeScript URL Handler Plugin
MIT License
52 stars 34 forks source link

Callback handling issue on iOS #74

Closed tucazinul closed 6 years ago

tucazinul commented 6 years ago

What did you do?

I've installed the plugin to handle the URL sent from a Share Extension to my main app. I've placed the handleUrl() function in the app.component.ts inside ngOnInit() so I can use other Angular components for the callback.

What did you expect to happen?

I was expecting that when receiving the URL from the share extension, the callback function will be called.

What happened instead?

However, when the app is resumed this works fine but when the app it's closed and opened using the URL the callback is not defined. I believe this happens because the bootstrapping for the angular happens after the call of "didFinishLaunchingWithOptions()" so the callback is not yet defined.

Your Environment

NativeScript version: 4.0.0 Java version: - NodeJS and NPM version: node v8.11.1, npm v5.6.0 Platform(s) running: macOS, iOS