Set name in recipients in MFMessageComposeViewController in place of mobile number

599 Views Asked by At

Hello friends I have used MFMessageComposeViewController to send message for specific mobile number. For that i have used following code:

if(phoneNumber)
{
    if([MFMessageComposeViewController canSendText])
    {
        MFMessageComposeViewController *controller = [[MFMessageComposeViewController alloc] init];
        controller.body = @"Hello";
        controller.recipients = [NSArray arrayWithObjects:@"+9876543210", nil];
        controller.messageComposeDelegate = self;
        [self presentViewController:controller animated:YES completion:nil];
    }
}

Here in recipients array i had set one mobile number. Can i set their name in place of the number? Due to privacy reason i don't want to show the mobile number there. Is it possible? If yes then how can we implement that.

Thanks in advance.

0

There are 0 best solutions below