简体   繁体   English

在Swift中,无法发送短信,但MFMessageComposeViewController委托显示已发送

[英]In Swift, Failed to send SMS but MFMessageComposeViewController Delegate Show sent

I am using MFMessageComposeViewController to send SMS from my app. 我正在使用MFMessageComposeViewController从我的应用程序发送短信。

The didFinishWithResult delegate method of MFMessageComposeViewController shows that the message has been sent successfully but actually this SMS failed to send due to insufficient balance. MFMessageComposeViewControllerdidFinishWithResult委托方法显示消息已成功发送,但实际上由于余额不足,此SMS无法发送。 So MFMessageComposeViewController does not show me the correct result. 因此, MFMessageComposeViewController不会向我显示正确的结果。

How do I know that the Messages app failed to send an SMS? 我怎么知道消息应用无法发送短信? Is there any way to get the failed status? 有什么办法可以获取失败状态?

It's not possible to know if the message is Sent or Failed from Messages app. 从“消息”应用中无法知道消息是已发送还是失败。

We get a result in messageComposeViewController:didFinishWithResult: once a message has been successfully queued for sending. 一旦消息已成功排队发送,我们将在messageComposeViewController:didFinishWithResult:得到结果。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM