iphone SDK中的短信主体 [英] SMS body in iphone SDK

查看:124
本文介绍了iphone SDK中的短信主体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要从我的iphone应用程序发送短信。以编程方式创建SMS的主体。因此,当我点击一个按钮时,应该打开SMS应用程序,并在其中预先键入我的消息。有谁知道怎么做?需要帮助

I need to send an SMS from my iphone app. the body of the SMS is created programatically. so when i tap on a button the SMS application should get opened with my message pre-typed in it. anybody knows how to do it? need help

提前致谢。
Shibin

Thanks in advance. Shibin

推荐答案

您无法设置SMS正文。根据官方SDK,您可以从代码中做的唯一事情是1)打开SMS应用程序:

You can't set the SMS body. The only things you can do from your code, as per the official SDK, is 1) to open the SMS application:

NSString *stringURL = @"sms:";
NSURL *url = [NSURL URLWithString:stringURL];
[[UIApplication sharedApplication] openURL:url];

和2)设置新邮件的电话号码:

and 2) to set the phone number for a new message:

NSString *stringURL = @"sms:+12345678901";
NSURL *url = [NSURL URLWithString:stringURL];
[[UIApplication sharedApplication] openURL:url];

这篇关于iphone SDK中的短信主体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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