I have an app that presents a MFMessageComposeViewController for sending a text message for a predefined number. The current user already has an SMS history with this number, so already existing SMS with this number show up in the composer. Some of this SMSs have links inside.
Problem is:
When I click on the link from my app message composer the link does nothing.
BUT when I open the SMS app, select the contact and click the links in old messages it opens in Safari.
Question is: is there any way I can handle the tap on the links inside an MFMessageComposeViewController?
From what I can tell this is not currently possible.
And you are also not aloud subclass. Since there are no other public messaging Apis you are out of luck on this one. - at least on this version of ios 7.
Related
I am using twilio to send SMS messages to phone numbers. What I am having problems with is making sure that once a user gets the message the preview of what is at a certain link actually loads in the message the user sees on the phone.
What is the proper way to send a link that automatically shows the preview?
EDIT:
I tried the open graph api. Apple does have a tech note on that. But, then, why does this link provided a proper preview in messages when I send this link to another phone? It works, and it does not use open graph.
https://i1.wp.com/www.asphaltandrubber.com/wp-content/uploads/2017/11/2018-Ducati-Panigale-V4-29.jpg?ssl=1
a couple of things you can try
have the link at start of the message or end of the message
the link should be properly formatted with either http:// or https://
iOS uses The Open Graph protocol to support what image to show in the link . http://ogp.me/
In my application I am able to send an SMS programatically to a particular mobile number when the user clicks submit button. Then there is a response message from that mobile number now I want to read that message and populate that SMS text in to my application.
I searched for this and found that this is not possible in iOS.
My question is there any possibility accessing inbox SMS with user permissions?
Simply two words from Apple:
Not Possible
Detailed:
An iOS app can only access the data for which Apple supplies a documented public API. iOS can not access outside of the sandbox until Apple provides a public API for it. So intercepting/reading an incoming SMS not possible. And no idea when the iOS device is jailbroken.
No it's not possible in iOS, it's possible on jailbroken devices but you can not place your application in the App Store.
You can't read SMS, but you can auto fill a text field from SMS.
From Apple Documentation :
To ensure your text input view displays the right AutoFill
suggestions, set the textContentType property on any relevant input
views.
so you can do the following :
textField.textContentType = .oneTimeCode
More info :
check the link here
In our app, we use MFMailComposeViewController in order to generate and send an invitation message, containing some text and a deep link. Sometimes, when there is a network communication problem, the deep link can't be shortened. When this happens, after the recipient gets the invitation message, the link is broken:
I have no idea why it happens. Is there any way to fix this? By the way, if the recipient uses an Android device, the link is displayed correctly.
My App allows users to share items from the App with their friends through SMS messages, which contains a deeplink that brings the recipient to that item in the App. I have noticed a few occasions where an extra link is automatically added to the SMS message that when pressed opens up the Map App on the phone and tries to go to an address. This is confusing to the user since the item being shown is a baseball card and the first link goes to an address instead of the item as expected. An example text that turns into a url is:
1933 Goudey #149 Babe Ruth PSA 4
Does anyone know how to turn off this functionality? I couldn't find any references to it.
do anybody know about how to read a SMS in iOS with Xamarin iOS ? and then I want to pass a string from that SMS to the application via link. For example when user click the link in the SMS it will pass a string value to the application and in the application a method is waiting to trigger that.
It's impossible to read incoming or storing SMS's due to iOS security restriction.
Although you can't directly intercept SMS messages, you can create a custom URL scheme so that if a user clicks a link in your message it will launch your app.
If Jason's answer of using a link to the app, there is an alternative. In my case a web service is sending down a code (two stage auth). When I know its going to be coming, I prompt the user to looks for it, and when it comes long press the message bubble, and copy the whole message to the pasteboard.
When the user switches back to my app, I've set a flag to look at the pasteboard, I see the message, extract out the code, and if it "works" the user can continue without further interruption.
Not as elegant as Jason's answer, but if you cannot control the sms content, its an option.
It is possible from iOS 12
textField.textContentType = .oneTimeCode
Please check this doc