Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/96.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在我的iOS应用程序中发送短信而不使用MFMessageComposeViewController?_Ios_Swift_Xcode_Mfmessagecomposeview - Fatal编程技术网

如何在我的iOS应用程序中发送短信而不使用MFMessageComposeViewController?

如何在我的iOS应用程序中发送短信而不使用MFMessageComposeViewController?,ios,swift,xcode,mfmessagecomposeview,Ios,Swift,Xcode,Mfmessagecomposeview,在我的应用程序中,我希望用户输入一个电话号码,按开始,然后每30分钟输入一个电话号码就会收到一条短信 我知道MFMessageComposeViewController可以打开文本视图控制器发送带有特定正文的消息,但我希望消息能够自动发送。有什么想法吗?不幸的是,如果没有MFMessageComposeViewController,您就无法做到这一点。苹果不允许在没有用户交互的情况下发送短信 我有另一个解决方案,超出了iOS的范围。 使用web服务API。在服务器端创建一个web服务,将消息发送

在我的应用程序中,我希望用户输入一个电话号码,按开始,然后每30分钟输入一个电话号码就会收到一条短信


我知道
MFMessageComposeViewController
可以打开文本视图控制器发送带有特定正文的消息,但我希望消息能够自动发送。有什么想法吗?

不幸的是,如果没有
MFMessageComposeViewController
,您就无法做到这一点。苹果不允许在没有用户交互的情况下发送短信

我有另一个解决方案,超出了iOS的范围。
使用web服务API。在服务器端创建一个web服务,将消息发送到接受数字作为请求参数的特定数字

在特定的时间间隔(根据您的要求)发送一个以数字作为请求参数的web服务调用


Web服务器可以做到这一点。它可以向任何设备发送消息。

最好的方法是使用消息服务,您可以将提交的号码发送到服务器并从那里处理号码。苹果不允许您在没有用户交互的情况下以本机方式发送任何消息