如何在Objective c中以编程方式发送带有一些正文的SMS [英] How to Send SMS with Some Body text Programmatically in Objective c

查看:135
本文介绍了如何在Objective c中以编程方式发送带有一些正文的SMS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


可能重复:

如何以编程方式在iPhone上发送短信?

如何使用Objective c从iPhone以编程方式发送带有一些正文文本的短信。
试图做类似的事情:

How to Send SMS with Some Body text Programmatically from iPhone using Objective c. Was trying to do something like :

NSString *path = [NSString stringWithFormat:@"sms:?&body:%@", aSMSBodyText];
NSURL *url = [NSURL URLWithString:[path stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
[[UIApplication sharedApplication] canOpenURL:url];

但不能正常工作,我不想使用MFMessageComposeViewController,因为我的应用程序支持从3.0开始和放大器; MFMessageComposeViewController适用于4.0以上版本。
期待任何帮助...

but not working, I don't want to use MFMessageComposeViewController, cause my app supports from 3.0 Onwards & MFMessageComposeViewController is applicable from 4.0 Onwards. Looking forward for any help...

推荐答案

如果不使用MFMessageComposeViewController,则无法发送短信。如果你想发送短信,那么你必须使用MFMessageComposeViewController。否则,您可以使用服务器来使用SMS。首先,您需要向服务器发送消息,然后服务器将消息发送到任何号码。
您还可以使用短信网关发送短信。

You can not send SMS without the use of MFMessageComposeViewController. if you want to send SMS, then you have to use MFMessageComposeViewController. Otherwise, you can use server to use SMS. First you need to send message to server and then server will send message to any number. You can also use SMS gateway for sending SMS.

这篇关于如何在Objective c中以编程方式发送带有一些正文的SMS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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