I create application, which have to adding, deleting and editing contacts to address book. Everything is fine, but problem is, when application is uninstalled. I cannot keep contacts in address book. I have to deleted all contacts which was added by my application. Is the any way to do this?
I know that is no way to detect when application is uninstalling.
for example my application working… adding contact:
+(int)addContactWithName:(NSString*)name withSurname:(NSString *)surname withNoTel:(NSString *) tel{ __block int noKontakt;
if (ABAddressBookGetAuthorizationStatus() == kABAuthorizationStatusDenied ||
ABAddressBookGetAuthorizationStatus() == kABAuthorizationStatusRestricted){
…
I create contact:
int noCon = [self addContactWithName:@"Monika" withSurname:@"Thomas" withNoTel:@"999999"];
I’m storing id contact in sqlite and i can delete or update when application working....
I can delete contact:
BOOL isDel = [self deleteContactById:(noCon);
But when user unistall application contact with id noCon has to be delete. How (or where) to do this? Thx