In viewDidLoad, I have subscribed to notifications to get external callback notifications. I dont know why I am not getting notifications in my app if i have changed anything in my iphone contacts.
I am doing in this way:
ab=ABAddressBookCreate();
ABAddressBookRegisterExternalChangeCallback(ab, MyAddressBookExternalChangeCallback, self);
And I have defined this in same controller
void MyAddressBookExternalChangeCallback ( ABAddressBookRef addressBook, CFDictionaryRef info, void *context ) {
[((TGTextsInboxController *) context) addressBookHasChanged];
}
How can I debug this ? I have tried in this way in Simulator.
- I opened my app upto TGTextsInboxController viewController
- I pressed home button, my app went in background
- nNow i have opened iPhone Contacts, changed any phone number of any person.
- Open app again from background to foreground.
- No notifications has been reflected. Neither degugger pointer hit to this method "MyAddressBookExternalChangeCallback"
Something wrong ?