开发者

SMS body in iphone SDK

开发者 https://www.devze.com 2022-12-17 10:47 出处:网络
I need to 开发者_如何学JAVAsend 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

I need to 开发者_如何学JAVAsend 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

Thanks in advance. Shibin


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];

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

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


You can set the body in iOS 4. Please cf the documentation.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号