IOS web view handling phone numbers - ios

I am using UIWebView to show some data.
UIWebView is detecting phone numbers, which is fine, but when the user clicks on the phone number it is trying to fire a call directly.
Is there any way I can show an confirm message after a user clicks on a phone number, to allow the user to confirm they would like to place a call to this number?

Did you try to putting a breakpoint in shouldStartLoadWithRequest delegate method of UIWebview ? You might be able to catch the event click there.

There is no part of UIWebView that allows you to know when a phone number has been clicked. You will either have to turn of phone number detection or detect phone numbers yourself and convert them to links manually, so will have control over what happens when you click them.

Related

How to detect non-intrusive phone call

In iOS 14 you can now accept phone calls that do not take up the entire screen (the new non-intrusive phone call UI looks like a push notification). If you accept the call, but do not open up the full screen call UI, the app remains open. This is true even if you pick up the phone and put it to your ear the app remains active.
What would the best way be to detect an incoming call, or that the user began the call?
You can’t detect it. If the user just takes the call direct from the banner, your app remains active and there is nothing to detect. That is the whole point of this feature: a call need not interrupt your app in any way.

iOS - Is it possible to make a phone call programmatically without showing the phone number?

I know we can make a phone call programmatically on iOS, and it opens the phone app and display the phone number. Is there a way to hide the phone number or show something else instead of the phone number?
Thanks.
You could make a contact for it so it shows the name of the contact name instead of the phone number, but there is no possible way to actually hide the phone number the user is calling.
You can not display name programatically when calling, because iOS does not provide you any mechanism in which you can pass name with phone number. The only way is you have to first save phone number with your desired name as a contact into user's phone and after that make a call programatically.

How are the CXStartCallAction isVideo property, and native video button used in CallKit?

I'm trying to figure out what happens when the user taps the video button in the native iOS call screen. I've gone through a few tutorials and looked at the code and it doesn't appear to be a delegate method or anything.
CXStartCallAction has a property: var isVideo: Bool, but I cannot seem to figure out how it is used.
I've noticed that (in the Speakerbox example project) it changes the display from "Speakerbox Video" to "Speakerbox Audio", but I'm assuming it has other uses.
The bigger question may be "what does the video button do?" Seems like it just opens the open, but not sure.
I'm trying to figure out what happens when the user taps the video
button in the native iOS call screen. I've gone through a few
tutorials and looked at the code and it doesn't appear to be a
delegate method or anything.
If you are talking about the "video" button on the screen when you receive an incoming CallKit call when the phone is locked, it apparently sends a new INStartVideoCallIntent intent to your application(_:continue:restorationHandler:) delegate method, just like if the user tapped a previous video call from your app in the Phone app's Recents, or if the user selected to make a video call to a contact in the Contacts app. It will also try to get the user to unlock the phone and then it will open your app.
CXStartCallAction has a property: var isVideo: Bool, but I cannot
seem to figure out how it is used.
CXStartCallAction is used for making outgoing calls. Whether a CallKit call is marked as video or audio is recorded in the Phone app's Recents and if you tap on a row in Recents it will make the same kind of call to the same person. Making a certain type of call may also make your app show as the default option for making that type of call on the contact's page in the Contacts app, though I'm not exactly sure how that works. Video calls also don't get ended when you lock the phone, but audio calls do.

iOS detect action from UITextView with phone number being tapped

iOS 7 and XCode 5.
I have a textview with a phone number that can be touched to make a call.
I have implemented the UIGestureRecognizer with a selector, but this "doesn't work" (more on that below)
The issue is this:
When I tap on the phone number on the device I get an alertview prompt "(phone) Cancel/Call"
Here's what I want to do:
I want to capture (for data collection purposes, not real behavior) whenever the user pushes the "call" button in the alertview.
The reason why the UIGestureRecognizer "doesn't work" is because the selector method only gets called if the user taps on the cancel button or taps on the phone link multiple times. Both of these cases are useless for me.
Any suggestions?
Note: I dont want to make a button to place the call since by doing this the OS takes me back to the phone app after the all instead of my app, like the textview does.

IOS How do I use a button send a message?

I set a button, it jump to make a phone call view while be clicked!Now I set another button send a message while be clicked. How to make it just stay in APP view rather than jump to the phone send message view.
Phone calls cannot be made from within an app. You can only redirect the user using a telephone number URL.
This isn't possible without delving into private frameworks.

Resources