Can record ID in iOS address book database change

  • Hi, all...

    The Address Book Programming Guide for iOS says that the ABRecordID of a person record in the address book database can change, after a MobileMe sync reset or for some other reason. Is this still true for iOS 5.0?

    That is, if I store an ABRecordID in my app and later want to retrieve that person with the following method, will I always get the person I want?

    ABRecordRef ABAddressBookGetPersonWithRecordID (
      ABAddressBookRef addressBook,
      ABRecordID recordID
    );

    If not, this is BAD. Primary keys that can change give me heartburn.

    Thanks

    Steve
  • I believe the transition to iCloud is also effectively a sync reset, so the IDs change.

    Arguably, your app needs to handle an ID going away anyway, in case the user decides to delete that contact from their address book at some point.

    On 6 May 2012, at 08:28, Steve Fogel wrote:

    > Hi, all...
    >
    > The Address Book Programming Guide for iOS says that the ABRecordID of a person record in the address book database can change, after a MobileMe sync reset or for some other reason. Is this still true for iOS 5.0?
    >
    > That is, if I store an ABRecordID in my app and later want to retrieve that person with the following method, will I always get the person I want?
    >
    > ABRecordRef ABAddressBookGetPersonWithRecordID (
    > ABAddressBookRef addressBook,
    > ABRecordID recordID
    > );
    >
    > If not, this is BAD. Primary keys that can change give me heartburn.
    >
    > Thanks
    >
    > Steve
previous month may 2012 next month
MTWTFSS
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
Go to today