Get Contacts out of Address Book who also use the application

227 Views Asked by At

I'm developing my first iPhone-application in Xcode and I was wondering if it is possible to get the contacts out of the Address Book of the iPhone who also use the application?

So what I need is a way to generate a unique ID based on the information in the Address Book, so that the ID that will be constructed for the same person will be the same on every iPhone where the application is used.

This way, I can use this ID as a primary key in the database I use to hold data that needs to be shared among users.

If I can construct this idea, I can also compute the ID for every Address Book member and check them against the ID's in my database to see who uses the app. But how can I construct such a unique ID?

1

There are 1 best solutions below

0
On

I am not sure.. accessing phone number in iPhone allowed or not ... as far as I know its not possible .. but in your application you can ask user to enter the his mobile number and then you can make phone number as unique ID... whatsapp is using the same thing ...

For getting phone number check this ..

How can I get the phone number of my iPhone device?

Programmatically get own phone number in iOS

How to get the phone number programatically