4

Using the new Contacts Framework in iOS 9, how can I get the contacts' creation date?

In previous versions, by using the Address Book Framework, I could do this:

ABRecordRef person = ...
NSDate *creationDate = (__bridge_transfer NSDate *)ABRecordCopyValue(person, kABPersonCreationDateProperty);

but I couldn't find the right way to do it using the new framework, there is no obvious property in CNContact nor any relevant key.

Disclaimer: this question was originally posted to SO.es, but as it didn't get any answer, I decided to post it here too.

Community
  • 1
  • 1
Marcos Crispino
  • 8,018
  • 5
  • 41
  • 59
  • Please file a bug report with Apple. The Contacts Framework did a very incompetent job of taking over from the Address Book Framework, and this is just one more example. – matt Dec 03 '15 at 17:27
  • @matt Ok, reported in issue #23744176. I'm not expecting much attention from Apple though... – Marcos Crispino Dec 03 '15 at 17:57
  • Every little bit helps! Even if you get closed as a duplicate, it's meaningful. – matt Dec 03 '15 at 18:18
  • I was just checking new Contacts framework for same thing, really how could they omit such a basic thing? – Adam Bardon Dec 10 '15 at 17:52

0 Answers0