In my iPhone app, I need to access the SMS application.
I need that when I click a button in my iphone app. It should open the SMS app of iphone and preload the message body with the text that I specify in my app.
How can we access the SMS API from iPhone app?
What should be done?
This is possible starting from iOS 4.0; use the MFMessageComposeViewController from the MessageUI Framework.
Details and example: http://developer.apple.com/library/ios/#samplecode/MessageComposer/Introduction/Intro.html
Try this :
MFMessageComposeViewController *pickerSMS = [[MFMessageComposeViewController alloc] init];
pickerSMS.messageComposeDelegate = self;
pickerSMS.body = @"hello!";
[self presentModalViewController:pickerSMS animated:YES];
[pickerSMS release];