Send SMS using MFMessageComposeViewController trims the recipients string
I'm trying to send an SMS to a email address (e.g. my.email@example.com) as follow:
MFMessageComposeViewController *picker = [[MFMessageComposeViewController alloc] init];
picker.messageComposeDelegate = self;
picker.recipients = [NSArray arrayWithObjects:@"my.email@example.com", nil];
However, the email address gets trimmed/formatted in the SMS composer To: line as bellow: "myemaile开发者_开发技巧xample.com"
I want to see the exact string that I'm passing in the To line, does anyone have any suggestion why it trims the input string?
Thanks a lot,
-Mehrdad
It's expecting a phone number, not an email address. From http://developer.apple.com/library/ios/documentation/MessageUI/Reference/MFMessageComposeViewController_class/Reference/Reference.html#//apple_ref/doc/uid/TP40009668-CH1-SW7:
Each string should in the array should contain the phone number of the intended recipient.
精彩评论