我使用MessageUI
框架发送消息。
以下是发送消息的代码:
let messageComposeVC = MFMessageComposeViewController()
messageComposeVC.messageComposeDelegate = self
messageComposeVC.body = self.textView.text
messageComposeVC.recipients = [contact]
self.present(messageComposeVC, animated: false, completion: nil)
然后显示如下屏幕:
我不想显示此屏幕,我想直接发送消息。有可能吗?
答案 0 :(得分:3)
这是不可能的。 Apple不会接受你的应用程序。如果您愿意,Apple会拒绝您的应用程序。备用方式是将消息和特定号码发送到后端,后端触发消息到特定号码。
或者您可以使用某些第三方
您无法在后台以编程方式发送短信,您可以使用以下第三方API发送短信(短信)。
http://www.nexmo.com/ - >我们也可以使用国际消息