Replies: 2 comments
|
The shell and opener plugins are unrelated. They are only relevant for e.g. clicking on You're looking for either the deep-link plugin, or you can add the scheme to the Info.plist yourself and listen to https://docs.rs/tauri/2.11.0/x86_64-apple-ios/tauri/enum.RunEvent.html#variant.Opened |
|
You're on the right track — Two separate things to get right here: 1. Receiving the Your "plugins": {
"deep-link": {
"desktop": {
"schemes": ["mailto"]
},
"mobile": [
{
"scheme": ["mailto"],
"appLink": false
}
]
}
}Then listen in Rust: use tauri_plugin_deep_link::DeepLinkExt;
.setup(|app| {
// Was the app launched by a mailto: link?
if let Some(urls) = app.deep_link().get_current()? {
println!("launched with: {urls:?}");
}
// Fired for every subsequent open while running
app.deep_link().on_open_url(|event| {
println!("opened with: {:?}", event.urls());
});
Ok(())
})or in JS via 2. Being a mail client (the entitlement)
"bundle": {
"macOS": {
"entitlements": "path/to/Entitlements.plist"
}
}with: <key>com.apple.developer.mail-client</key>
<true/>The entitlement makes your app eligible to be the default mail app; the user still has to select your app as the default handler in System Settings (macOS) / Settings (iOS). deep-link makes the app capable of being handed the URL, the entitlement + user choice makes it the default. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
We're developing an email client app for iOS and macOS and planning to apply for the com.apple.developer.mail-client entitlement.
Did some research, now I'm not sure which plugin(s) handle this, is it deeplink, opener, shell, or combination of them? I think this could be the tauri-plugin-deplink job, I added:
in my default
tauri.conf.jsonfile. Any clue if that's the right way to do?#5544
https://v2.tauri.app/plugin/opener/
#14491
All reactions