Search code examples
iosswiftcontactsaddressbook

How to get "My Number" from AddressBook framework ?


I need to retrieve "My Number" from AddressBook but I can't find out how to do so. When accessing the contacts in AddressBook, I managed to get all the contacts but I don't know how to get the "My Number". I know it's accessible as for instance on my phone, it is categorised under my first and last name and therefore I manage to take it from there. But I would like the standardised way to access the "My Number".

Thank you infinitely for your help,


Solution

  • This is not allowed. There is no public API to get user's phone number. There are few open question on SO that cover this theme. For example this.