How to open system's iPhone Dial pad in iOS app - ios

The problem is: I don't want to dial immediately, I need when user taps the 'call' button, app jumps to dial pad in phone app, aand user enter's the phone number,then user can press 'Call' button to make this phone call.
[[UIApplication sharedApplication] openURL:#"tel://"]

This is not possible, however why don't you like the 'tel://' method since it keeps the user in your app once the call terminates? I haven't seen a single app that redirects to the call screen to dial a number since the call button is more simpler.

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.

How can you use a button to send a vibrational pattern to another iOS device in swift?

The user enters another user's phone number. If both people are inside the app simultaneously, each user can tap a big button which makes the other person's device vibrate simultaneously. How can I make the button make the other person's iOS device vibrate?
You need to establish some line of communication between the two devices. This is a very vague question, in general, but to get immediate vibration, you'll want some server communicating over a socket with both devices. If one device presses the button, it tells the server to vibrate the other device. The server then tells the other device to vibrate.

How to jump to dial pad in iOS

To make a phone call, use [[UIApplication sharedApplication] openURL:#"tel://"] it's very easy.
The problem is: I don't want to dial immediately, I need when user taps the 'call' button, app jumps to dial pad in phone app, and displays specific phone number, user can press 'Call' button to make this phone call.
Anybody know how can I achieve this?
Appreciate!
iPhone SDK not allows you to dial a number from the application. But you can do it by using a UITextField. Set keyboard type to UIKeyboardTypePhonePad
textfield.keyboardType = UIKeyboardTypePhonePad;
and set that number to textfield,
textfield.text = numberToDial;
and then call the following line when user taps on your call button
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:#"tel://%#",textfield.text]]];

opening dial pad for calling number user want

i want to open dial pad when user click on call button and then user enter phone number and call it
i know we can make call like this
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"telprompt://2135554321"]];
but i want to open dial pad and then let user enter number and press call button to call
if this is not possible then want to do something like my app open direct to dail pad then user call it and then it should redirect to my app
No you cant do this in iOS . iPhone SDK not gives you direct access to dial a numbers from the application .The one way to achieve this is
take a text field
textfield.keyboardType = UIKeyboardTypePhonePad;
and
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:#"tel://%#",textfield.text]]];
You have to see the format for entering the number.
Why not create a UIView that has a "UITextField" and when the text field comes up, have the keyboard set to only be numbers (i.e. pretty much the same thing as the dialpad).
And once they are done entering in the number, then you can call the "openURL" line you have above.

IOS web view handling phone numbers

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.

Resources