Reputation: 4069
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!
Upvotes: 5
Views: 1926
Reputation: 1818
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".
Upvotes: 8