Please do not post the same thing multiple times. The board software automatically flags certain posts as needing moderator attention. This happens the most often for new users. I'm pretty sure this is made clear at the time you attempt to post. Posting the same thing over and over again just makes that many more posts the moderators have to weed through later. This makes us sad. Don't make us sad. If your post/thread doesn't appear, just wait a while. Don't post it again. If it hasn't shown up by the next day, then you can try again. I normally go through posts in the mornings, and try to check a few times throughout the day, but I'm not here 24/7. There will typically be a significant delay before posts are approved. Just be patient.
I have a weird problem not sure how to go about this. I am trying to delete an empty group... All the codes execute correctly but the group could not be deleted. After i quit the app. using contacts, the group is still there.
Hope that any one can point me in the correct direction.
I have a weird problem not sure how to go about this. I am trying to delete an empty group... All the codes execute correctly but the group could not be deleted. After i quit the app. using contacts, the group is still there.
Hope that any one can point me in the correct direction.
Sorry to revive an old thread but was searching and thought I'd answer this one since it didn't get a solid answer yet.
The reason it's not deleting is because you're creating a new group with the same name as the existing one. Instead of creating a new group, you need to iterate through the existing groups and find the one with the name you're looking for and pass its ABRecordRef into the ABAddressBookRemoveRecord() method.
Adds/deletes are handled using unique record ids. Any time you create a new record, it gets a unique id. Therefore, the id will never match the group that was created previously.
Replies
ABAddressBookRemoveRecord(ab, group, &err);
ABAddressBookSave(ab, &err);
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeThe reason it's not deleting is because you're creating a new group with the same name as the existing one. Instead of creating a new group, you need to iterate through the existing groups and find the one with the name you're looking for and pass its ABRecordRef into the ABAddressBookRemoveRecord() method.
Adds/deletes are handled using unique record ids. Any time you create a new record, it gets a unique id. Therefore, the id will never match the group that was created previously.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome