我已在我的应用中启用NotificationServiceExtension。并完成以下
以下是我的NotificationService的 didReceiveNotificationRequest 方法
- (void)didReceiveNotificationRequest:(UNNotificationRequest *)request withContentHandler:(void (^)(UNNotificationContent * _Nonnull))contentHandler {
self.bestAttemptContent = [request.content mutableCopy];
self.bestAttemptContent.badge = @20;
self.contentHandler(self.bestAttemptContent);
}
不知道我在这里想念的是什么。搜索并跟踪了许多文档。似乎什么都没用。
我正在使用XCode 11.2.1和具有ios版本13的真实设备。