发送短信而不在iOS中显示MessageComposeViewController [英] Send SMS without presenting MessageComposeViewController in iOS

查看:115
本文介绍了发送短信而不在iOS中显示MessageComposeViewController的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在发送短信演示。我想发送如何发送SMS以及如何将委托设置为MessageComposeViewController。并且为了发送我们在行下面的消息

I am working on sending SMS demo. I want to send how to send the SMS and how to set the delegate to MessageComposeViewController. and in order to send the message we have below line

[self presentViewController:messageController animated:NO completion:nil];

此行将在屏幕上显示带有SEND按钮的MessageComposeView。一旦我们点击发送按钮,它就会发送消息。我想要的是直接发送消息而不在屏幕上显示这个MessageController。请帮助我该怎么做。

This line will present the MessageComposeView on screen with SEND button. And Once we click on send button it sends the message. What I want is to send the message directly without presenting this MessageController on screen. Please help how can I do this.

推荐答案

在这个相关的问题中,Apple在没有用户点击发送按钮的情况下发送短信就有了限制。

In this related question, Apple has restrictions in place on being able to send a SMS message without the user clicking the SEND button.

Apple 真的希望用户控制其手机的短信功能。否则各种各样的数据可能会飞离一些随机应用程序(例如,通过试试这个应用程序!来发送你的联系人,这不是非常友好也不是很好)。

Apple really wants the user to be in control of the SMS functionality of their phone. Otherwise all sorts of data could be flying off some random app (e.g. spamming your contacts with "try this app out!", which would not be very friendly nor very nice).

此问题中的一个答案 具有潜在的非MFMessageComposeViewController解决方案,但我有一种感觉,如果Apple抓住你这样做,他们可能会拒绝你的应用程序被批准用于应用程序商店。

One of the answers in this question does have a potential non-MFMessageComposeViewController solution, however I have a feeling that if Apple catches you doing this they might deny your app from being approved for the app store.

这篇关于发送短信而不在iOS中显示MessageComposeViewController的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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