MFMessageComposeViewController opens MMS editing instead of SMS and 'buddy name' text instead of telephone number
Asked Answered
R

1

5

I develop an IOS app with a feature, which sends SMS with a source code generated text to source code generated telephone recipients.

It works great for several months for ~hundred user, but now I got an interesting bug: when SMS UI appears, instead of the telephone number I pass to it, there is a "Buddy name" text and instead of SMS the message type is MMS. It happened on an IPhone 4 with IOS 7.

The way I use it (telephone number is an NSString):

NSArray* recipients = [NSArray arrayWithObject:telephoneNumber];

MFMessageComposeViewController *controller = [[MFMessageComposeViewController alloc] init];
if([MFMessageComposeViewController canSendText])
{
    controller.body = message;
    controller.recipients = recipients;
    controller.messageComposeDelegate = self;
    [self presentViewController:controller animated:YES completion:nil];
}

Is there any more settings, method calling (...) to avoid this strange behaviour?

Thanks very much!

Rules answered 13/11, 2013 at 10:15 Comment(1)
did you find a solution for placing SMS instead of MMS in title?Banditry
D
8

I encountered the same issue and found this question. Has this problem been resolved?

Thought it was an iOS 7 bug until I discovered an error on my part. I have added a string @"?" to recipients array instead of a phone number. When the message composer sees an invalid number, it displays "Buddy Name". After I corrected the error, "New Message" is displayed instead of "New MMS".

Declassify answered 5/4, 2014 at 14:46 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.