0

I would like to add the ability to change the name of a group in the address book. However I can't seem to find an existing method to do this.

Does anyone know if such a method exists? Or is my only option to copy the members of the group, add them to a new group with the new name, and delete the old group?

halfer
  • 19,824
  • 17
  • 99
  • 186
Ian
  • 1,850
  • 6
  • 23
  • 38

1 Answers1

1

You can use the function

bool ABRecordSetValue (ABRecordRef record,ABPropertyID property,CFTypeRef value,CFErrorRef *error);  

record is the reference to the group record in the address book
property is the kABGroupNameProperty property that represents the group name
value is the new group name

Afterwards you have of course to save the address book with

OK = ABAddressBookSave(addressBookRef, &error);
Reinhard Männer
  • 14,022
  • 5
  • 54
  • 116
  • No idea where my head was yesterday. I use that all the time for actual contacts, don't know why I didn't think to use it for a group. Thank you. – Ian May 08 '14 at 17:46