I have an implementation of a notification content extension which uses the default notification content (the two text lines at the bottom) provided by iOS when opened:
The problem is that when a new notification arrives while the UNNotificationContentExtension
is opened the title and body strings of the footer do not get updated. I've checked that method didReceive()
is being correctly invoked again and that the passed UNNotification
has the correct updated information (parameters notification.request.content.body
and notification.request.content.title
). However, the OS appears to simply ignore them, leaving the text at the bottom unchanged even through we can update the content itself with no issue.
Is it possible to force the default content to update? There doesn't seem to be any parameter and/or method which we can use to do so...
Thank you in advance for any response.
EDIT: I should also add that the notifications are being generated locally (APN is not active yet). The code looks something like this:
UNMutableNotificationContent *notificationContent = [UNMutableNotificationContent new];
notificationContent.categoryIdentifier = @"my.notification.category";
notificationContent.title = @"My notification title";
notificationContent.body = @"My notification body";
UNNotificationRequest *request = [UNNotificationRequest requestWithIdentifier:notificationUUID
content:notificationContent
trigger:notificationTrigger];
UNUserNotificationCenter *notificationCenter = [UNUserNotificationCenter currentNotificationCenter];
[notificationCenter addNotificationRequest:request withCompletionHandler:nil];