Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS: Launching Messages app with multiple recipients

I'm trying to set it up so my user can send a text to a group of people. Now with email it's simple, the URL scheme is just mailto://[email protected],[email protected] which can then be used with the openURL method.

Naturally when it came to SMS I decided to try sms://2065555555,2061234567 however this doesn't work (it only adds the first number). After browsing Google a bit, I found some older threads claiming that texting to multiple recipients isn't possible using the URL method.

In order to send a message to multiple people, I've gone ahead and added MessageUI to my application, hooked up the MFMessageComposeViewControllerDelegate, and now I can send indeed send messages to multiple people at once. However only from within my own application, which is not what I want. I was hoping there'd be something in the framework that would allow me to take advantage of the multiple recipients functionality and then launch it in the default messenger, but I can't find anything that allows that.

So, in short, is there any possible way I can code my app to populate the default Messages app with multiple recipients?

Edit

Actually I'm certain there must be a way to do it, I just checked the app Cobook and they allow the user to select contacts then launch the Messages app sending a "New Group MMS".

like image 825
Ian Avatar asked May 23 '14 03:05

Ian


People also ask

Can you have a group chat in SMS?

Unfortunately, unlike the case is with iPhones, Android phones can't really create group chats when it comes to SMS. iPhones can send photos, videos, reactions, and other things via the native messaging app using the internet, thanks to the iMessage feature.

How do I see recipients of a group text on iPhone?

All replies At the top of the group message, if you click the top where it shows the number of people, then click info, it will show you a list of participants.

Can you create a group text contact on iPhone?

Tap on Messages icon to create new message Click on the pencil icon to create new message When you check your message history, it displays 'Group MMS' instead of 'New Message' Page 3 • Tap the 'To' field and then enter the first phone number, or tap on the + icon and select the recipient phone number from Contacts page ...


1 Answers

I realize this is a very old question - but I discovered the way to do it recently, and posted about it here:

SMS WatchKit multiple number delimiter

While this answer is watchkit specific, the url is really what you are asking about.

ANSWER: I found an obscure page that gave me the answer. Turns out it is not documented by Apple anywhere I could find:

    let urlSafeBody = messageBody.stringByAddingPercentEncodingWithAllowedCharacters(NSCharacterSet.URLHostAllowedCharacterSet())
    if let urlSafeBody = urlSafeBody, url = NSURL(string: "sms:/open?addresses=1-408-555-1212,1-408-555-2121,1-408-555-1221&body=\(urlSafeBody)") {
        WKExtension.sharedExtension().openSystemURL(url)
     }

The above version will open the messages app on the Apple Watch with multiple recipients pre-populated.

There are many pages that state it isn't possible, but it is. Hooray!

like image 79
Charlie Avatar answered Oct 18 '22 16:10

Charlie