开发者

send sms programmatically on iPhone

开发者 https://www.devze.com 2023-01-18 04:36 出处:网络
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, wit

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

精彩评论

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