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.
- Apple's MessageComposer sample project has code that shows you how to send an SMS using the MFMessageComposeViewController class.
Alternatively, you can use:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"sms:1-408-555-1212"]];
精彩评论