开发者

send sms programmatically on iPhone

in my application I want to send predefine smstext to one single number on certain event , 开发者_StackOverflow how to send sms like that?


You cannot send an SMS without user intervention. However, with the user's "approval" there are two ways to send an SMS from an iPhone application.

  1. Apple's MessageComposer sample project has code that shows you how to send an SMS using the MFMessageComposeViewController class.
  2. Alternatively, you can use:

    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"sms:1-408-555-1212"]];
    
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜