MFMessageComposeViewController stops sms messaging

I am using MFMessageComposeViewController in my iOS application.

MFMessageComposeViewController *controller = [[[MFMessageComposeViewController alloc] init]; if([MFMessageComposeViewController canSendText]){ controller.body = text; controller.recipients = [NSArray arrayWithObjects:recipient,nil]; controller.messageComposeDelegate = self.navigationController; [self.navigationController presentViewController:controller animated:YES]; } -(void)messageComposeViewController:(MFMessageComposeViewController *)controller didFinishWithResult:(MessageComposeResult)result { [self dismissModalViewControllerAnimated:YES]; } 

The "send message" button is blue. If you send a message to a non-iMessage user, the iPhone sends sms, not iMessage, but on some devices (iPhone 4, 5) the operation fails. After this error, you cannot send messages to the user at all! using the standard sms application on the iPhone.

Removing a contact, rebooting, shutting down iMessage does not solve this problem. MFMessageComposeViewController kills sending sms, and we cannot solve this problem. We have a version of iOS 6.1.3 on test devices.

+4
source share
1 answer

to try

 controller.messageComposeDelegate = self; 
0
source

Source: https://habr.com/ru/post/1499801/


All Articles