views:

32

answers:

2

I am deleting contacts from addressbook programmatically. I got error "There's already an instance of AddressBookSync running" on console and my application is not responding. There are 5000 contacts in addressbook.

When iSync preferences option "Enable Syncing on this computer" is unchecked then all is working well. But when it is checked, then got that error. So what to do for deleting contacts with "Enable Syncing on this computer" option checked.

or any other way for that is acceptable...

A: 

Are you using Sync Services in your app?.

Found this warning in the Sync Services Programming Guide.

Important: If your application uses the Sync Services and Address Book frameworks together, then you should not use Sync Services to sync data shared with the Address Book Framework. The Address Book Framework already syncs its records with Sync Services, so applications sharing the Address Book data do not have to (and should not) sync those records. The results are unpredictable and may result in data loss, if you attempt to sync the same data as the Address Book Framework.

markhunte
No. Just Addressbook framework.
Hiren Gujarati
A: 

Tell user to disable syncing on this computer from iSync. It should be not done by programmatically.

Hiren Gujarati