1

Given the iOS Address Book API, or possibly other App Store friendly APIs, is it possible to find the user’s contacts that also use iOS? The only heuristic I was able to come up with was finding all contacts that have a kABPersonPhoneIPhoneLabel phone number – but that method has a lot of both false positives and negatives.

zoul
  • 102,279
  • 44
  • 260
  • 354
  • No this is not possible. Since there is no owner identifying properties on the contacts. – rckoenes Mar 19 '14 at 14:31
  • What do you mean by “owner identifying properties”? The system already knows which contacts support iMessage, for instance. I would be happy even with that, although iMessage support != iOS device. – zoul Mar 19 '14 at 14:38
  • What I meant with “owner identifying properties” is that you loop thru all the contacts in the Address book and find the owner. But this is not possible! Yes the device knows the usersnumber, but Apple does not allow developers to access it. – rckoenes Mar 19 '14 at 14:47
  • possible duplicate of [How does Square's CardCase app automatically populate the user's details from the address book?](http://stackoverflow.com/questions/8000927/how-does-squares-cardcase-app-automatically-populate-the-users-details-from-th) – rckoenes Mar 19 '14 at 14:54
  • I think you misunderstood my question. I’m not after the device owner. I just want to go through all contacts in the system address book and filter those that possibly also use an Apple device. – zoul Mar 19 '14 at 15:15
  • Well the like @Daij-Djan you are at the mercy of the user. If he added some numbers a iPhone numbers which they are not it's not going to work. – rckoenes Mar 19 '14 at 15:23
  • 1
    Which is why I am asking the question :-) – zoul Mar 19 '14 at 16:51

2 Answers2

4

This is now possible using CloudKit and the CKDiscoverAllContactsOperation class. You only get the user’s contacts that also use the same app and have given an explicit permission, but for some use cases it’s a nice start.

zoul
  • 102,279
  • 44
  • 260
  • 354
  • I would guess Apple will reject apps that enable CloudKit just to use this API and don't store anything in it. I would be careful. – pgb Jun 12 '14 at 17:35
  • On the contrary, I think they said in one of the WWDC videos that people can use the user discovery feature without the rest of the CloudKit. – zoul Jun 12 '14 at 18:18
1

your heurisitic might be ok but it relies on the USER correctly setting that attribute.

depending on the context it might be good enough / or not .. dont know.


there is no real way to detect which user really uses ios (no API)

Daij-Djan
  • 49,552
  • 17
  • 113
  • 135