MFMessageComposeViewController adds line break after nesting

I realized that iOS9 adds line break after attachment when trying to send SMS using MFMessageComposeViewController .

This is a problem because our SMS receiver parses the input characters to redirect it to the correct mailbox. We use a text prefix and it does not work.

It works great in iOS 8. The snapshot below is where the problem occurs.

 combined = @"ABC TIPS"; messageVC.recipients = @"123456789"; messageVC.messageComposeDelegate = self; [messageVC setBody:combined]; UIImage *myImage = image; NSData *imgData = UIImagePNGRepresentation(myImage); if (image != NULL){ // Present message view controller on screen [messageVC addAttachmentData:imgData typeIdentifier:@"public.png" filename:@"image.png"]; [self presentViewController:messageVC animated:YES completion:nil]; } 

In iOS8, the message is composed for: attachment - body

But iOS9 seems to have put it together: attachment - new line - body

I want to delete the "new line" part ... Does anyone accept what we can do (besides rewriting so as not to use SMS)?

+5
source share

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


All Articles