I'm trying to figure out to store a reference to an ABPerson in a Core Data store on an iPhone app. Ultimately, I'd like to be able to sync with a Mac version of the app (I'm assuming ABRecordIDs wouldn't be the same for the iPhone and the Mac). I was thinking of storing the record ID, name, and email and checking against those--is there a better way?
Asked
Active
Viewed 1,250 times
0
-
Sorry, just to be clear, I don't want to sync the actual contact, just a reference to the contact, but I can't figure out a way to do that without a name and/or email lookup. – shosti Mar 16 '10 at 17:33
2 Answers
0
You can use kABPersonCreationDateProperty instead of kABUIDProperty, which is available in iOS.

Artur
- 61
- 5
0
It kind of sounds like you're attempting to out-guess or re-do the syncing functionality Apple's already implemented. Can you describe exactly what you mean by "sync with a Mac version of the app"?
If you're asking for a better way to store the information about an ABPerson
to make it easy to recover the next app launch, there is a property in ABPerson
, kABUIDProperty
, which will give you a unique identifier for the record that is guaranteed not to change. I used something similar with an app that uses the Media Player Framework to identify exact songs between launches.

Shaggy Frog
- 27,575
- 16
- 91
- 128
-
1kABUIDProperty isn't available on the iPhone, unless the docs are out of date. – Jablair Mar 16 '10 at 13:08