1

我想在我的 iPhone 应用程序中使用短信。我意识到集成短信模块是不可能的,我们可以通过传递号码切换到iPhone的短信应用程序。

我尝试了以下方法,但仍然无法打开内置 SMS 应用程序。

NSString *no = @"9904143445";
NSString *sms = [NSString stringWithFormat:@"smsto:%@",no];
[[UIApplication sharedApplication]openURL:[NSURL URLWithString:sms]];

知道可能出了什么问题吗?

4

2 回答 2

7

您的 URL 协议错误:“smsto”应该只是“sms”

于 2009-05-01T10:26:55.020 回答
4

我们已经从我们的网络应用程序中使用了 sms:+1254545454 [专为 iPhone 构建],它完全可以调用内置的 SMS 应用程序。

于 2009-05-01T10:03:43.577 回答