In Objective-c ABAdressBook having kABPersonModificationDateProperty for that in swift CNContact what should i use..?
CNContact in swift
AddressBook framework is deprecated but not yet removed. You can use AddressBook framework APIs from Swift.
(Though, frankly, using C-function based APIs from Swift is not an easy thing.)
And it seems there's no equivalent of kABPersonModificationDateProperty in Contacts framework currently.
CNContact date last updated/inserted
You need still to use AddressBook framework, (I'm not sure if all functionalities work in iOS9.x) or find another way around.
6 weeks ago, I submitted a bug to Apple using Bug Reporter regarding the missing modification date and creation date properties in the new Contacts Framework. I am eager for Apple to fix the problem as well.
The modification date property is still missing in iOS 11. I thought Apple strived to be responsive to the needs of its developer community? Sadly, a number of us have been asking for this property for 2 years, and no action has been taken.
The modification date property is still missing in iOS 11.
What was your bug number?
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"
When can we expect CNContact Creation and Modification date properties to available? I am really in need to access these properties. Shall I use AddressBook framework instead of CNContact?
When can we expect CNContact Creation and Modification date properties to available?
I can’t discuss The Future™. My recommendation is, as always, if some part of the system isn’t meeting your needs you should file an enhancement request describing your requirements.
Please post your bug number, just for the record.
I am really in need to access these properties. Shall I use AddressBook framework instead of CNContact?
It’s hard to offer concrete advice here because I’m not familiar with your product. There are a bunch of drawbacks associated with the AddressBook framework, including:
It’s been officially deprecated since iOS 9.
It’s kinda painful to use from Swift.
You’ll have to trade those off against the benefits you get from
kABPersonModificationDateProperty.
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"
I am unable to move to CNContact framework because of lack of modification and creation time, so i have to stick to ABAddressBook
But now ABAddressBook is behaving wierdly, i can add / delete contact from addressbook,but edit / update is not working.
It would be better if you can support CNContact with creation / modification time
I have filed a bug using Bug Reporter. It's bug #28626886. If you can see to it that this bug gets elevated, I would really appreciate it.
Even i had filed bug using Bug Reporter, Id is 28626886. Please update on the issue.