1

I'm trying to send out the message by MFMessageComposeViewController. Delegate get the result MessageComposeResultSent. But I didn't receive the SMS in fact. And I can't find the history in Message.

This problem also occurs in Sample code provided by developer.apple.com https://developer.apple.com/library/ios/documentation/MessageUI/Reference/MFMessageComposeViewController_class/Reference/Reference.html

Device: iPhone5S OS: iOS 7.1.2

Nirav Bhatt
  • 6,940
  • 5
  • 45
  • 89
gorilla
  • 11
  • 2

2 Answers2

0

try below code

 NSArray *arrPhoneNumbers = [NSArray arrayWithObjects:@"1234567890", nil];
 MFMessageComposeViewController *controller = [[MFMessageComposeViewController alloc] init];
    if([MFMessageComposeViewController canSendText])
    {
        controller.body = @"Message";
        controller.recipients = [NSArray arrayWithArray:arrPhoneNumbers];
        controller.messageComposeDelegate = self;
        [self presentViewController:controller animated:YES completion:nil];
    }
Shubhendu
  • 1,081
  • 8
  • 13
0

It looks self-fixed when I reboot my iphone. I totally have no idea about the reason, but it really works now.

gorilla
  • 11
  • 2