我正在开发一个简单的应用程序,它必须从应用程序本身发送一条SMS消息,而不是启动本地文本应用程序。如何在不启动文本应用程序的情况下发送短信?
这是我现在的动作。我应该改变什么来实现我想要的功能?
-(IBAction)startButtonPressed
{
NSString *phoneNumber = @"13136296693";
NSString *url = [NSString stringWithFormat: @"sms:%@",phoneNumber];
NSLog(@"Send SMS to: %@ ", url);
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:url]];
}
谢谢!
托马斯
谢谢!我现在检查一下。 – Thomas 2010-04-15 14:22:00