"No Mail Accounts" alert is not showing

Hi,


Our team discovered that the "No Mail Accounts" alert is not showing on iPad Pro 12.9 inch 13.1.1. I checked the view hierarchy to verify alert was not behind another VC/View. The alert does display on the simulators (difference is the iOS is 13.0). Has anyone else experienced this? We dont want to have to check device type, ios version etc., to determine when to manually display the alert.



guard MFMailComposeViewController.canSendMail() else { return }


On the simulator we get the Alert, "No Mail Accounts". We DO NOT get the alert on iPad Pro 12.9 inch 13.1.1 device.


Please let me know what I am missing?


Thanks,


KJSqubit

Replies

Same issue for us on devices (and simulator) running iOS 13. The "No Mail Accounts" alert is not showing up. But if we run the app on iOS versions < 13, the alert is displayed. Did you find a solution for this?

Did you find a solution for this?

Could you show the code ?

There seem to be a need to generate an alert:

h ttps://www.hackingwithswift.com/example-code/uikit/how-to-send-an-email


But, if you don't call canSendMail(), do you see the alert when the account does not exist ?

That's a suggestion in this old dicussion:

https://stackoverflow.com/questions/17925414/show-system-alert-no-mail-accounts

Did you find a solution? Same issue with iOS 14.