NSE Filtering

we already got access to com.apple.developer.usernotifications.filtering , we have set up this special permission in our app extension entitlement and provision profile. but we are still unable to filter notification by providing empty UNNotificationContent
@dipak10112 Did you set the apns-push-type header field to alert when you send the notification to the APNS server?
Hi,

There is a note on the documentation about this:

To silence a remote notification, you must set the apns-push-type header field to alert when you send the notification to the APNS server. Otherwise, the system always displays the notification banner to the user.

Hi. I am facing same problem, I got access to use entitlement but notification is not being hidden. I tried it with both sandbox and production env. My notification payload is

[AnyHashable("aps"): { alert = { body = "Tap to explore"; title = APP Name; }; badge = 0; "content-available" = 1; "mutable-content" = 1; }]

As described here com.apple.developer.usernotifications.filtering you have to use an extension and then to call contentHandler(UNNotificationContent()) to suppress a notification. As for the APS-Payload "mutable-content" has to be set and it has to be an alert. Without "mutable-content" your notification is not being called.

Hello I have the same problem The model of my notification is

{
  "headers": {
     "apns-push-type": "alert"
  },

  "aps": {
	"alert": {
			"title": "Test title",
			"body": "You have received a new message."
	},
	"mutable-content": 1
  }
}

I can catch notification in UNNotificationServiceExtension but i can't filter it with contentHandler(UNNotificationContent())

Is anyone able to found solution for this, after having entitlement still not able to suppress notification

It seems that you started your own thread for this; let’s focus this discussion there.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

NSE Filtering
 
 
Q