Deep Linking
Set your Tauri application as the default handler for an URL.
Supported Platforms
- Android
- iOS
Setup
This plugin requires a Rust version of at least 1.75
Install the deep-link plugin to get started.
Use your project’s package manager to add the dependency:
-
Run
cargo add tauri-plugin-deep-link
to add the plugin to the project’s dependencies inCargo.toml
. -
Modify
lib.rs
to initialize the plugin: -
Install the JavaScript Guest bindings using your preferred JavaScript package manager:
Setting up
Android
For app links, you need a server with a .well-known/assetlinks.json
endpoint that must return a text response in the given format:
Where $APP_BUNDLE_ID
is the value defined on tauri.conf.json > identifier
with -
replaced with _
and $CERT_FINGERPRINT
is a list of SHA256 fingerprints of your app’s signing certificates, see verify android applinks for more information.
iOS
Server
For universal links, you need a server with a .well-known/apple-app-site-association
endpoint that must return a text response in the given format:
Where $DEVELOPMENT_TEAM_ID
is the value defined on tauri.conf.json > tauri > bundle > iOS > developmentTeam
or the TAURI_APPLE_DEVELOPMENT_TEAM
environment variable and $APP_BUNDLE_ID
is the value defined on tauri.conf.json > identifier
. See applinks.details for more information.
App
You also need to add the associated domains to your app’s entitlements
file:
See supporting associated domains for more information.
Configuration
Under tauri.conf.json > plugins > deep-link
, configure the domains you want to associate with your application:
Usage
The deep-link plugin is available in both JavaScript and Rust.
Permissions
By default all plugin commands are blocked and cannot be accessed.
You must define a list of permissions in your capabilities
configuration.
See Permissions Overview for more information.
Permission | Description |
---|---|
deep-link:default | Allows reading the opened deep link via the get_current command. |
deep-link:allow-get-current | Enables the get_current command without any pre-configured scope. |
deep-link:deny-get-current | Denies the get_current command without any pre-configured scope. |
© 2024 Tauri Contributors. CC-BY / MIT