Instance Method

getNotificationCategoriesWithCompletionHandler:

Retrieves the app’s currently registered notification categories.

Declaration

- (void)getNotificationCategoriesWithCompletionHandler:(void (^)(NSSet<UNNotificationCategory *> *categories))completionHandler;

Parameters

completionHandler

The block to execute asynchronously with the results. This block may be executed on a background thread. The block has no return value and takes the following parameter:

categories

The set of UNNotificationCategory objects containing your registered notification types. If your app has not yet registered any categories, this parameter is an empty set.

Discussion

Use this method to retrieve your app’s currently registered notification types. You might use this method when you want to augment the current set of categories with new categories later on. Simply merge the returned set with any new category objects and register the updated set.

See Also

Registering the Notification Categories

- setNotificationCategories:

Registers your app’s notification types and the custom actions that they support.