goal c – IOS – motion button is just not seen in native push notification

[ad_1]

Following is code in objective-c so as to add motion button throughout app launch –

 UNUserNotificationCenter *heart = [UNUserNotificationCenter currentNotificationCenter];
 UNNotificationAction *ActionBtn1 = [UNNotificationAction actionWithIdentifier:@"Btn1" title:@"Open App" options:UNNotificationActionOptionNone];
 UNNotificationCategory *class = [UNNotificationCategory categoryWithIdentifier:@"richNotificationCategory" actions:@[ActionBtn1] intentIdentifiers:@[] choices:UNNotificationCategoryOptionNone];

 NSSet *classes = [NSSet setWithObject:category];
 heart setNotificationCategories:classes];

Additionally setting categoryIdentifier whereas scheduling notification –

notificationContent.categoryIdentifier = @"richNotificationCategory";

nonetheless motion button is just not seen. any trace please?

[ad_2]

Leave a Reply