没有安装邮件应用程序的 MFMailComposeViewController?
MFMailComposeViewController without Mail app installed?
现在可以在 iOS 10 中删除像 Apple 的 "Mail" 应用程序这样的应用程序,当开发人员尝试初始化和显示 MFMailComposeViewController
而默认邮件应用程序不是时会发生什么在设备上安装和配置?
如果应用程序崩溃,检查这种情况的最佳方法是什么?
在 iOS 12 及更高版本上,即使未安装邮件应用程序,canSendMail()
也会 return true
。 MFMailComposeViewController
将显示,但用户将无法发送邮件。
在 iOS 低于 12 的版本上:
看起来 MFMailComposeViewController.canSendMail()
会 return false,而 MFMailComposeViewController()
会导致崩溃 (EXC_BAD_ACCESS)。使用 canSendMail()
检查来确定设备是否可以显示 MFMailComposeViewController
.
现在可以在 iOS 10 中删除像 Apple 的 "Mail" 应用程序这样的应用程序,当开发人员尝试初始化和显示 MFMailComposeViewController
而默认邮件应用程序不是时会发生什么在设备上安装和配置?
如果应用程序崩溃,检查这种情况的最佳方法是什么?
在 iOS 12 及更高版本上,即使未安装邮件应用程序,canSendMail()
也会 return true
。 MFMailComposeViewController
将显示,但用户将无法发送邮件。
在 iOS 低于 12 的版本上:
看起来 MFMailComposeViewController.canSendMail()
会 return false,而 MFMailComposeViewController()
会导致崩溃 (EXC_BAD_ACCESS)。使用 canSendMail()
检查来确定设备是否可以显示 MFMailComposeViewController
.