ProtonMail/ios-mail

Allow other apps to open the Proton Mail inbox, instead of just the compose window

joshuakcockrell opened this issue · 1 comments

What we're trying to do

We want to give our users a way to open (deep link into) the Proton Mail inbox. This is used on screens like the following:

Screenshot 2024-01-08 at 9 59 11 AM

The issue

ProtonMail doesn't provide a URL scheme to open the app's inbox. Proton Mail does provide one to open Proton Mail's compose window, but this is confusing for our users because they tap the button and it open's the Proton Mail app, skips over the inbox, and shows a screen to create a new email:

Screenshot 2024-01-08 at 11 32 10 AM

This results in complaints like the following:

Once I select the option to open protonmail it opens the app but automatically opens a new message template which is odd

You can see it's common for mail apps to provide URL schemes that open to the inbox. ProtonMail is the only one on this list that doesn't:

"canary:" // Canary App inbox
"readdle-spark:" // Spark App inbox
"airmail:" // Airmail App inbox
"fastmail:" // Fastmail App inbox
"googlegmail:" // Gmail App inbox
"ms-outlook:" // Outlook App inbox
"ymail:" // Yahoo Mail App inbox
"protonmail:" // Proton Mail App (opens compose window)

Proposed solution

Proton Mail could provide a URL scheme such as protonmail:inbox or protonmail:open?destination=inbox that just opens the app and doesn't show the "compose new email" screen.

Looks like an if statement just needs to be added to

private func handleUrlOpen(_ url: URL) -> Bool {

Maybe even copy pasting that existing deep link logic but dropping the deeplink.append(DeepLink.Node(name: "toComposeMailto", value: path)) line would work?