0

I'm using the MFMessageComposeViewController to allow my users to send out app download invites to their friends. I want to load the View Controller with the recipients field blank, so the user can add whoever they wish. When I use the code below, a recipient 'Buddy Name' displays. How can I remove this?

MFMessageComposeViewController *messageController = [[MFMessageComposeViewController alloc] init];   
if ([MFMessageComposeViewController canSendText])       
{
    messageController.body = @"My app text...";
    messageController.recipients = [NSArray arrayWithObjects:@"", nil];
    messageController.messageComposeDelegate = self;
    [self presentViewController:messageController animated:YES completion:nil];        
}
Azat
  • 6,745
  • 5
  • 31
  • 48

2 Answers2

3

This can remove the Buddy Name:

messageController.recipients = nil
Ayman Ibrahim
  • 1,359
  • 15
  • 24
0

Just remove the following line

messageController.recipients = [NSArray arrayWithObjects:@"", nil];
Azat
  • 6,745
  • 5
  • 31
  • 48