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?
A:
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
2010-03-16 07:15:24
kABUIDProperty isn't available on the iPhone, unless the docs are out of date.
Jablair
2010-03-16 13:08:15