Notification in iOS when changing sort order

When I add or delete or change a contact in the Contacts application, my application receives a notification since I registered ABAddressBookRegisterExternalChangeCallbackin my method AppDelegate didFinishLaunchingWithOptions.

However, when I change the sort order of contacts in the Mail, Contacts, Calendar settings on the iPhone, I do not receive any notifications. Can someone help me with the name of the notification that I must follow?

+4
source share
1 answer

At the moment, I myself have decided this solution. I refer to iVar called lastSortOrdering. In the method, didFinishLaunchingWithOptionsI initialize it

lastSortOrdering = ABPersonGetSortOrdering();

The applicationWillEnterForeground method

if(lastSortOrdering!=ABPersonGetSortOrdering()) {
    lastSortOrdering = ABPersonGetSortOrdering();
    NSLogDebug(@"Sort ordering was touched by user");
    //Perform contact fetching with new sort order
}

, - , .

+3

All Articles