You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/plugin/deep-linking.mdx
+17-4Lines changed: 17 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -217,12 +217,18 @@ The deep-link plugin is available in both JavaScript and Rust.
217
217
<TabssyncKey="lang">
218
218
<TabItemlabel="JavaScript">
219
219
220
-
When a deep link triggers your app to be opened, the `onOpenUrl` callback is executed:
220
+
When a deep link triggers your app while it's running, the `onOpenUrl` callback is called. To detect whether your app was opened via a deep link, use `getCurrent` on app start.
// Note that getCurrent's return value will also get updated every time onOpenUrl gets triggered.
231
+
}
226
232
227
233
awaitonOpenUrl((urls) => {
228
234
console.log('deep link:', urls);
@@ -232,7 +238,7 @@ await onOpenUrl((urls) => {
232
238
</TabItem>
233
239
<TabItemlabel="Rust">
234
240
235
-
When a deep link triggers your app to be opened, the `on_open_url` closure is called:
241
+
When a deep link triggers your app while it's running, the plugin's `on_open_url` closure is called. To detect whether your app was opened via a deep link, use `get_current` on app start.
236
242
237
243
```rust title="src-tauri/src/lib.rs"
238
244
usetauri_plugin_deep_link::DeepLinkExt;
@@ -242,6 +248,13 @@ pub fn run() {
242
248
tauri::Builder::default()
243
249
.plugin(tauri_plugin_deep_link::init())
244
250
.setup(|app| {
251
+
// Note that get_current's return value will also get updated every time on_open_url gets triggered.
0 commit comments