Move appUrlOpen listener to plugin and listen for eventBus event

This commit is contained in:
advplyr 2023-11-01 10:16:31 -05:00
parent d613d8954d
commit 737d8f19b3
2 changed files with 38 additions and 32 deletions

View file

@ -282,6 +282,14 @@ export default ({ store, app }, inject) => {
window.history.back()
}
})
/**
* @see https://capacitorjs.com/docs/apis/app#addlistenerappurlopen-
* Listen for url open events for the app. This handles both custom URL scheme links as well as URLs your app handles
*/
App.addListener('appUrlOpen', (data) => {
eventBus.$emit('url-open', data.url)
})
}
export {