0

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?

D.M
  • 510
  • 6
  • 14
  • 1
    Apple Maps don't require permission because the application is made by none other than Apple. All third party applications need to explicitly ask users' permission before accessing any data on their devices – Malik Aug 03 '17 at 09:13

2 Answers2

1

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.

Dhaval Dobariya
  • 171
  • 1
  • 12
0

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.

  • This should be a comment instead an answer – NaturalDevCR Mar 28 '22 at 16:42
  • This does not provide an answer to the question. Once you have sufficient [reputation](https://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](https://stackoverflow.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/late-answers/31395272) – NSKevin Mar 31 '22 at 07:19