iOS: Launching Messages app with multiple recipients - ios

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://firstemail#email.com,secondemail#email.com 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".

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!

Apple's documentation for the "sms://" URL scheme seems to indicate only one phone number is possible within that URL.
The easiest thing to do here is to continue using MFMessageComposeViewController (which has a look and feel really close to the default Messages.app that people use to send and receive SMS messages).
And
MFMessageComposeViewController has a receipients property which is an array, which means you can have multiple destination phone numbers in your compose view.
Lastly, here is a related question which covers a lot of the same ground you're thinking about here.

Related

Opening app from sms and getting the sms contents in iOS

I am trying to build an iOS application. The basic premise is that the user receives an SMS which has a message, a link to the application, and other details. For example, the message might look like this:
Good morning! Kindly open the application: mylink://here
Additional Info: 123123
Additional Info: 321321
I know that if the user has installed my application, he or she will be able to click the mylink://here and it will open my application. Answers in this question discuss said topic thoroughly. My concern mainly has something thing to do with fetching the additional information from the text message. My application will need the additional informations in the SMS and is there a way to fetch the additional information without having to programmatically go through them in my application?
Since the application is opened via SMS, is there a provision in iOS that provides your application, if opened by an SMS, with the raw SMS text?
I'm a bit new in iOS development and I'm mostly relying on what I am able to research online. As much as possible I do not want to fetch the SMSs (if iOS even allows that), find the one I'm looking for, then parse from there.
Well you can't read or send sms messages... At all. That's a big no-no in standard iOS. However, you could pass some simplified info via url scheme. It could look something like this:
myappscheme://www.someurl.com?flag=true&myotherinfo=hi
You'll want to read more about it here: https://developer.apple.com/library/ios/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/Inter-AppCommunication/Inter-AppCommunication.html
Sorry from Apple side but can't access these on a standard, non-jailbroken iPhone. You should file a bug with Apple, perhaps they'll improve SMS access in the future.
Not possible
Check this https://developer.apple.com/library/ios/documentation/MessageUI/Reference/MFMessageComposeViewController_class/index.html
For SMS sending through application allowed but for accessing inbox for sms/email not allowed.
It is only possible when the phone is Jailbreaked. There are many tools to jailbreak your phone.
Once Jailbreaked, an application cal open the SQLite database at
/var/mobile/Library/SMS/sms.db and read the message table.
It contains, the date/time at which the message was received, the sender/recipient phone number and even the clear text of the message.
Refer this Question to read content of sms: Read SMS message in iOS

Read verification code automatically and access for Login in App in iOS

I am creating one App and it has verification phone number required functionality which allow user to enter into App. We send sms to the Users through the gateway and we need to read verification code directly from the SMS without typing code into App. But don't know how to read verification code automatic from the SMS and access in my App.I have gone thorugh the searches for this but could not find any path to move ahead. Is it allow in iOS and if Yes, can anyone tell me what to do to achieve it. Thanks.
Apple added this feature in iOS 12
just add:
if #available(iOS 12.0, *) {
self.verifyCodeTextField.textContentType = .oneTimeCode
}
to your controller and make sure your SMS has "Verification code", "code", "Login code" in it and apple will read those messages and show the last 1 minute received code on top of your keyboard for verifyCodeTextField.
You can check your SMS and there is a line under the number it means apple has detected it in your SMS and you are good to go.
If other people know the keyword in other languages that helps apple to detect the code I would love to know them.
From iOS 12 it is possible to improve the user experience for native textField (actually anything that implements UITextInputTraits to be precise) by:
myOTPTextField.textContentType = .oneTimeCode
More information can be found in docs
For the HTML you can achieve it by:
<input id="my-one-time-password-textfield" autocomplete="one-time-code"/>
More information can be found in docs
Your app can not read directly from the list of SMS messages. That would be a security risk.
But a couple things you can do would be 1:
allow the user to type in the verification code from the SMS (that seems to be the standard thing for most apps)
2:
use a custom URL scheme such as "myapp://verfication:12345" that when clicked in a SMS, goes straight to your installed app and does the verification. Here is a tutorial on how to do the Custom URL scheme thing.

How to send a text inside an iOS app?

Is it possible to send a text immediately inside an app. I have implemented the sms send. I just want to bypass the screen where the user has to press send.
There is no way to bypass the MFMessageViewController screen where the user has to tap "send." I assume Apple has designed it this way to prevent an app from potentially spamming a user's contact list.
In addition, there is no way to detect income SMS. Both these features are strictly reserved for the native Messages app.
For more information on sending an SMS on iOS check this out.
One alternative is to implement sending and receiving messages within your app using a web service to store and retrieve messages. For example, you could use a messages library like JSQMessagesViewController documented here and for simplicity's sake, you could use a BaaS like Parse.

Possible to open mail app with search results displayed from app?

I don't want to write my own email app. All I want is to be able redirect to mail with a preconfigured search string to display relevant emails. There doesn't appear to be a way to read or list emails from mail.app from within another app. Am I overlooking something? Is there a workaround for this?
I am fully aware of and able to use message UI in my app. What I want is to read, not send, email that has already been downloaded and exists in mail.app.
The only way that you can use to connect apps with other apps in iOS is thought url scheme.
You can take a look at Url Scheme reference
but it seems like you can't make this action.
UPDATE:
you can take a look the extra functionalities at Wikipedia

Calling a telephone number to download Android/iPhone app

Color App for Android and iPhone can be downloaded by calling a certain number (call **COLOR (**26567)). How exactly it works? I'm interested in both the way it redirects the user on the UI level as well as the technology used.
I understand that "**" is some kind of special prefix used it US - can it be done without this prefix (i.e. by calling an typical cellphone/stationary number)?.
I am posting this question here because I believe it is related to programming. I also cannot check it as I live outside US.
The answer below is from the Developers website: http://support.color.com/home
I guess the computer-based answering machine records your number when you call it, and then sends out a text message with a direct link to the app. Quite simple and elegant solution.
How do I get Color?
The easiest way is to call *COLOR (*26567) from your device. You will instantly receive a text message with a link to download the app from the Apple App store or Android Market.

Resources