I'm attempting to tracking push notification opens and dismissals with a custom analytics system on iOS and I have been unable to get any UNNotificationDismissActionIdentifier responses to come through.
My code that registers with the notification center:
if([[[UIDevice currentDevice] systemVersion] integerValue] >= 10){
UNNotificationCategory* generalCategory = [UNNotificationCategory
categoryWithIdentifier:@"GENERAL"
actions:@[]
intentIdentifiers:@[]
options:UNNotificationCategoryOptionCustomDismissAction];
// Register the notification categories.
UNUserNotificationCenter* center = [UNUserNotificationCenter currentNotificationCenter];
[center setNotificationCategories:[NSSet setWithObjects:generalCategory, nil]];
[center setDelegate:self];
};
When I send my push notification, I set the category to GENERAL. When I receive the notification and swipe right to dismiss it, I don't receive any delegate callbacks.
Does customDismissAction only work for local notifications?