0

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?

rmaddy
  • 298,130
  • 40
  • 468
  • 517
  • You could use the phone number as a unique ID. – JuJoDi Dec 12 '13 at 14:26
  • @JuJoDi: that will only work if the user is on an iPhone. iPod touch and iPad won't have a phone number. You can try email address OR phone number, but that's about the best you're going to get. You can also have all users log in before they can use the app, but it's not as easy to use. – Scott Berrevoets Dec 12 '13 at 14:28
  • get all properties or some of them, make a hash – Grzegorz Krukowski Dec 12 '13 at 14:31

1 Answers1

0

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

Community
  • 1
  • 1
rambo
  • 41
  • 7