简体   繁体   中英

send sms programmatically on iPhone

在我的应用程序中,我想在特定事件中将预定义的短信发送到单个号码,如何发送这样的短信?

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

I got the solution go through this link i am trying it now ....

its only for jailbroken phone ...

Click Here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM