views:

62

answers:

1

Hi,

I am writing code to send sms programatically Program crashes at second last line.

MFMessageComposeViewController *picker = [[MFMessageComposeViewController alloc] init];
picker.messageComposeDelegate = self;
picker.recipients = [NSArray arrayWithObject:@"123456789"];   // your recipient number or self for testing

picker.body = @"test from OS4";
[self presentModalViewController:picker animated:YES];
[picker release];
A: 

I assume it's safe to say that it implements

UIViewController <MFMessageComposeViewControllerDelegate>


In which case, I would recommend going back to http://iphonesdkdev.blogspot.com/2010/04/mfmessagecomposeviewcontroller-sample.html, copying their example and progressing from there.

KevinDTimm
Thanks KevinDTimm , i am using the same example :(
T. A.
and with their example, you get that failure? Is it failing in the emulator or on the device?
KevinDTimm
Emulator :( , i havent checked it on device yet
T. A.
Did you find a solution? I see you selected this an 'the' answer - what was the resolution?
KevinDTimm