Srithar Rajendran
Srithar Rajendran

Reputation: 330

Display a contact name when calling a number programmatically in iOS

I have a requirement to display a contact name when calling a phone number programmatically in iOS.

One way is, we can save the contact name before dial using "tel:\(number)", But then the problem is that iOS needs permission alert when accessing the Contacts.

But, the same permission alert does not show when trying to call from Apple maps. So, I want to know how Apple maps work while calling a phone number? Or how we can handle this?

Upvotes: 0

Views: 708

Answers (2)

Saifuddin Sepehr
Saifuddin Sepehr

Reputation: 1

There are some paid services for this such as Engage iOS SDK. You need to pay for that. You can request a demo before you pay, so it's a good thing.

Upvotes: 0

Dhaval Dobariya
Dhaval Dobariya

Reputation: 171

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.

Now regarding permission dialogue, there is no issue with using MKMapView and saving contact from same screen where map is showed. There may be some issue which prevents permission dialogue to be display.

Upvotes: 1

Related Questions