Reputation: 655
With iOS14 users can set different email client apps as their default.
Is there a way to open the selected default mail app programmatically?
Using mailto:
URLs, after setting the default mail app to Gmail, don't do anything.
Upvotes: 17
Views: 6711
Reputation: 19
I just saw this in the doc url_launcher package, that's why it didn't work for me:
URL schemes are only supported if there are apps installed on the device that can support them. For example, iOS simulators don't have a default email or phone apps installed, so can't open
tel:
ormailto:
links.
Upvotes: 1
Reputation: 126
Add following to info.plist
<key>LSApplicationQueriesSchemes</key>
<array>
<string>https</string>
<string>http</string>
<string>mailto</string>
</array>
Upvotes: 8
Reputation: 655
Apparently you have to add mailto
to the LSApplicationQueriesSchemes
to make it work.
Upvotes: 21