Reputation: 7807
I know it is possible to open the iMessage app when a new message ready to send to a contact using the openURL:
method with the format sms:5555555555
but how do I open a group chat? I know it is possible because Launch Center Pro does it.
Upvotes: 1
Views: 1192
Reputation: 10612
You don't open a group chat per say. There is no group chat application. Or subapplication. Just like anything else when you have multiple objects you pass it in an array. So simply create all the phone numbers in an array and set the recipients to the name of the array.
This is provided you are using MFMessageComposeViewControllerDelegate
NSArray *recipents = @[@"12345678", @"72345524"];
MFMessageComposeViewController *messageController = [[MFMessageComposeViewController alloc] init];
messageController.messageComposeDelegate = self;
[messageController setRecipients:recipents];
[messageController setBody:message];
Upvotes: 2