I am able to test the normal notifications in Simulator, but when I tried to test rich notifications nothing happens, event title is not getting updated.
Could you please assist me, how to proceed. Do I need to change any simulator settings? I am using Xcode 11.4
Sample Payload :
{
"aps": {
"mutable-content": 1,
"alert": {
"body": "Push notification body",
"title": "Push notification title"
}
},
"media-url": "https://i.imgur.com/t4WGJQx.jpg"
}
NotificationService Extension Method:
- (void)didReceiveNotificationRequest:(UNNotificationRequest *)request withContentHandler:(void (^)(UNNotificationContent * _Nonnull))contentHandler {
self.contentHandler = contentHandler;
self.bestAttemptContent = [request.content mutableCopy];
self.bestAttemptContent.title = [NSString stringWithFormat:@"%@ [modified]",
self.bestAttemptContent.title];
}