微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

MFMessageComposeViewController 无法向多个收件人发送单条消息

如何解决MFMessageComposeViewController 无法向多个收件人发送单条消息

下面的代码用于打开带有正文消息和更多收据 (10 - 200) 的 MFMessageComposeViewController。在 14 岁以下的 iOS 中它运行良好,但现在绿色的发送按钮什么也不做。

我错过了什么?

 messageController = MFMessageComposeViewController() 
 messageController.body = message
 messageController.recipients = recipients
 messageController.messageComposeDelegate = self

 controller.present(messageController,animated: true)

更新: 在使用 iPhone 6 iOS 12.4 进行测试后,相同的代码可以正常处理 100 个收据,但使用新的 iOS 最多 10 个收据,但我在文档中找不到这种行为。

还要注意,如果我上传了超过 10 个联系人的照片,并且文本字段附近的存储图标消失,并且当我输入超过一行文本时,文本字段不会显示所有文本

所以在玩完控制器和他的子视图后,我放弃了这个任务并开始使用短信链接

 let recipientsstring = phoneNumbers.joined(separator: ",")
 let sms: String = "sms:/open?addresses=\(recipientsstring)&body=\(message)"
 let strURL: String = sms.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)!
 UIApplication.shared.open(URL.init(string: strURL)!,options: [:],completionHandler: nil)

像魅力一样工作,唯一的问题是我没有任何回调。

对于那些想要重现该问题的人,请打开包含 100 个联系人和正文消息的 MFMessageComposeViewController

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。