简体   繁体   English

如何在iOS应用中发送文本?

[英]How to send a text inside an iOS app?

Is it possible to send a text immediately inside an app. 是否可以在应用程序内立即发送文本。 I have implemented the sms send. 我已经实现了短信发送。 I just want to bypass the screen where the user has to press send. 我只想绕过用户必须按发送的屏幕。

There is no way to bypass the MFMessageViewController screen where the user has to tap "send." 没有办法绕过用户必须点击“发送”的MFMessageViewController屏幕。 I assume Apple has designed it this way to prevent an app from potentially spamming a user's contact list. 我认为Apple就是以此方式设计的,以防止应用程序潜在地向用户的联系人列表发送垃圾邮件。

In addition, there is no way to detect income SMS. 此外,无法检测短信收入。 Both these features are strictly reserved for the native Messages app. 这两个功能都是为本机Messages应用严格保留的。

For more information on sending an SMS on iOS check this out. 有关在iOS上发送SMS的更多信息, 请查看此内容。

One alternative is to implement sending and receiving messages within your app using a web service to store and retrieve messages. 一种替代方法是使用网络服务来存储和检索消息,从而在您的应用程序内实现发送和接收消息。 For example, you could use a messages library like JSQMessagesViewController documented here and for simplicity's sake, you could use a BaaS like Parse. 例如,您可以使用此处记录的消息库,例如JSQMessagesViewController ,为简单起见,您可以使用像Parse这样的BaaS。

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

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