Deep Linking
Set your Tauri application as the default handler for an URL.
Supported Platforms
- Windows
- Linux
- macOS
- 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 the following command in the
src-tauri
folder 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 (mobile) and schemes (desktop) you want to associate with your application:
Usage
The deep-link plugin is available in both JavaScript and Rust.
Permissions
By default all potentially dangerous plugin commands and scopes are blocked and cannot be accessed. You must modify the permissions in your capabilities
configuration to enable these.
See the Capabilities Overview for more information and the step by step guide to use plugin permissions.
Default Permission
Allows reading the opened deep link via the get_current command
allow-get-current
Permission Table
Identifier | Description |
---|---|
|
Enables the get_current command without any pre-configured scope. |
|
Denies the get_current command without any pre-configured scope. |
|
Enables the is_registered command without any pre-configured scope. |
|
Denies the is_registered command without any pre-configured scope. |
|
Enables the register command without any pre-configured scope. |
|
Denies the register command without any pre-configured scope. |
|
Enables the unregister command without any pre-configured scope. |
|
Denies the unregister command without any pre-configured scope. |
© 2024 Tauri Contributors. CC-BY / MIT