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.
Go to Settings and scroll down until you find the browser app or the email app. Tap the app, then tap Default Browser App or Default Mail App. Select a web browser or email app to set it as the default. A checkmark appears to confirm it's the default.
Show activity on this post. let email = "[email protected]" let url = URL(string: "mailto:\(email)") UIApplication. shared. openURL(url!)
Apparently you have to add mailto
to the LSApplicationQueriesSchemes
to make it work.
Add following to info.plist
<key>LSApplicationQueriesSchemes</key>
<array>
<string>https</string>
<string>http</string>
<string>mailto</string>
</array>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With