tschoffelen / react-native-email-link

📭 Open an email client from React Native (for 'magic link' type functionality).
MIT License
413 stars 74 forks source link

Apple Mail vs Default email reader #110

Closed nicolasdevienne closed 2 years ago

nicolasdevienne commented 2 years ago

Apple Mail is renamed with "Default email reader" with last version 1.14.1

previous version installed (1.13.1), we have "Mail" IMG_8534

last version installed (1.14.1), we have "Default email reader" IMG_8535

nicolasdevienne commented 2 years ago

Hi @tschoffelen ! No PR for this issue ? :)

tschoffelen commented 2 years ago

What solution would you suggest for this?

This change was made because now iOS has the option to change the default mail client, this first option didn't always link to the stock 'Mail' app anymore (since we're using the mailto:// URL scheme).

See the discussion in this PR here: https://github.com/includable/react-native-email-link/pull/108

nicolasdevienne commented 2 years ago

I don't understand how it works ? I have 3 mail clients installed on my iPhone : Apple Mail, Outlook and Gmail. If Apple Mail is my default mail client, I have 3 options in action sheet as you can see on my screenshort and the first option open Apple Mail. If Outlook is my default mail client, I have the same option but "Outlook" option is not replace by "Apple Mail" option... I have 2 options for the same client mail and no option for Apple Mail... Yet I have this configuration in my Info.plist :

    <key>LSApplicationQueriesSchemes</key>
    <array>
        <string>message</string>
        <string>readdle-spark</string>
        <string>airmail</string>
        <string>ms-outlook</string>
        <string>googlegmail</string>
        <string>inbox-gmail</string>
        <string>ymail</string>
        <string>superhuman</string>
        <string>yandexmail</string>
        <string>fastmail</string>
        <string>protonmail</string>
    </array>

Maybe I forget something ?...

tschoffelen commented 2 years ago

Apple doesn't give us the ability to detect what email client is set as the default one unfortunately, this is just the app that the system tells to respond to the mailto:// URI scheme.

There is also no URI scheme that specifically targets Apple Mail, so if you have another client set to default, we can't open the Apple Mail app to draft a message. These are just iOS limitations, nothing I can see that we could so differently in this library to be more user friendly unfortunately...

nicolasdevienne commented 2 years ago

Hi @tschoffelen and thank you! Is it possible to translate "Default email reader" for French app?

nicolasdevienne commented 2 years ago

@tschoffelen

tschoffelen commented 2 years ago

Hi @nicolasdevienne! Happy to accept a PR to make the defaultEmailLabel customisable!

nicolasdevienne commented 2 years ago

@tschoffelen I can't push my PR

remote: Permission to includable/react-native-email-link.git denied to nicolasdevienne.
fatal: unable to access 'https://github.com/includable/react-native-email-link.git/': The requested URL returned error: 403

Could you give me permission ?

tschoffelen commented 2 years ago

You can't push directly to this repository - you'd push to your own fork, then create a PR.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork

nicolasdevienne commented 2 years ago

@tschoffelen done! https://github.com/includable/react-native-email-link/pull/113