I have enabled NotificationServiceExtension in my app. And done the following
- Added .apppex under Frameworks, Libraries and Embedded contents
- Confirmed both deployment target version is 12.0
- Sending mutable-content": 1 in my apns notification payload
Following is my NotificationService's didReceiveNotificationRequest method
- (void)didReceiveNotificationRequest:(UNNotificationRequest *)request withContentHandler:(void (^)(UNNotificationContent * _Nonnull))contentHandler { self.bestAttemptContent = [request.content mutableCopy]; self.bestAttemptContent.badge = @20; self.contentHandler(self.bestAttemptContent);
}
Don't know what I am missing here. Searched and followed so many documents. Nothing seems to be working.
I am using XCode 11.2.1 and real device with ios version 13.