Following is code in objective-c to add action button during app launch -
UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter];
UNNotificationAction *ActionBtn1 = [UNNotificationAction actionWithIdentifier:@"Btn1" title:@"Open App" options:UNNotificationActionOptionNone];
UNNotificationCategory *category = [UNNotificationCategory categoryWithIdentifier:@"richNotificationCategory" actions:@[ActionBtn1] intentIdentifiers:@[] options:UNNotificationCategoryOptionNone];
NSSet *categories = [NSSet setWithObject:category];
center setNotificationCategories:categories];
Also setting categoryIdentifier while scheduling notification -
notificationContent.categoryIdentifier = @"richNotificationCategory";
still action button is not visible. any hint please?