Is it possible to send an SMS message from an iOS app to the current caller when a call is in progress? - ios

I have searched and have not been able to find a definitive answer. I know that it is not possible to get the phone number of the current caller using Objective-C, but I don't need the number.
I want to send a text message to the current caller. Does iOS have a method to allow you to send a text message from an app to the current caller.
The scenario is this:
End user calls another user
They put the person they called on speaker phone and navigate to my app
The app has a button that allows them to share information via SMS to the person they are talking to while they are talking to them without having to do anything more than click a button (the user doesn't have to type the other person's phone number manually to send the SMS).

Sukhdeep is correct.iOS will never allow you to perform Messaging without user involvement.

The answer is No.
Apple will never allow you this.

Related

Authenticate with Firebase using Phone Number iOS

I have to create a sign up phone number option in app and I am getting a little confused when it comes to phone number/verification textfield and whole interface controller. Do I have to create this on my own or firebase auth is supporting this screen as it happens in digits?
firebase docs: https://firebase.google.com/docs/auth/ios/phone-auth
You have two solutions, one would be to use their UI:
https://github.com/firebase/FirebaseUI-iOS
The second one would be to create the UI on your own and just call methods mentioned in the link you shared:
verifyPhoneNumber (which returns the code)
credentialWithVerificationID (creates verification object)
signInWithCredential (accepts the verification object and tries to sign-in)
Basically, you want to get the user phone number in order to receive the code(most likely from a textfield). Once you successfully sent the code. transition to a view where the user can enter the code received thru sms than login the user. keep in mind the phone number format has to be something like this +countrycodeStatecodeNumber or +13051239988

Sending a text message without being prompted [duplicate]

Is it possible to send sms via iphone without user intervention? I already know about MessageUI framework and MFMessageComposeViewController class, but this option requires user to click Send button when MGMessageComposeViewController is presented. I would like the device to automatically, without my help send a text message when certain conditions are met. (I have some sensors connected to the device)
No. You can only open a message ready to send but you cannot send it automatically.
If you want to be able to send sms without user's interaction, consider using some third party gateway. TextMagic provides nice api to send sms, but it is not free. At some point it charges you money. But, they have nice and simple api to use.
Look at this,
http://api.textmagic.com/https-api/textmagic-api-commands#send

How do I Generate a Text Message to a Predefined Phone Number in iOS 10?

Let's say I have the user of my app define a phone number in a setup step of my program, saved in the plist as a number with the key "PhoneNum". Now lets say that I want to have a button in the program which, when pressed, generates a text message that says "Hi! How are you today?" to the phone number saved under "PhoneNum". Is it possible to have this message auto-send without confirmation from the user? If so, can you point me in the right direction?
Yes, it's possible, if you pay for an SMS-sending service. Type “sms sending api” into your favorite search engine.
If you want to send a message through the user's own iMessages or cell phone account, then you cannot do it without confirmation. How to programmatically send SMS on the iPhone?

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.

How to read a SMS in iOS and is it able to pass an string to the application via link in the SMS

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

Resources