MFMailComposeViewController没有安装邮件应用程序? [英] MFMailComposeViewController without Mail app installed?

查看:185
本文介绍了MFMailComposeViewController没有安装邮件应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现在,像Apple 10的Mail应用程序这样的应用程序可以在iOS 10中删除,当开发人员尝试初始化并显示 MFMailComposeViewController 并且默认的Mail应用程序在设备上未安装和配置?



如果应用程序崩溃,检查此案例的最佳方法是什么?

解决方案

它看起来像 MFMailComposeViewController.canSendMail()将返回false,而 MFMailComposeViewController() / code>将导致崩溃(EXC_BAD_ACCESS)。使用 canSendMail()检查以确定设备是否可以显示一个 MFMailComposeViewController


Now that apps like Apple's "Mail" app can be deleted in iOS 10, what will happen when a developer attempts to initialize and present MFMailComposeViewController and the default Mail app is not installed and configured on the device?

If the app crashes, what is the best way to check for this case?

解决方案

It looks like MFMailComposeViewController.canSendMail() will return false, and MFMailComposeViewController() will cause a crash (EXC_BAD_ACCESS). Use the canSendMail() check to determine if the device can show a MFMailComposeViewController.

这篇关于MFMailComposeViewController没有安装邮件应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆