I'm trying to make a custom notification alert. I added my extension target and changed the UNNotificationExtensionCategory
value to 'drawing'.
In my push notification I added a "category" : "drawing"
element to the aps
block. The didReceive(_:)
method from that extension is never getting called though. What did I forget to do?
You seem to have done whats needed. I too had similar problem of not seeing the custom notification screen. However, whats not mentioned in the documents of UNNotificationContentExtension is that the custom screen appears only when you do a 3D touch on the notification alert. I tried to do a 3D touch and the custom screen appeared. Please check.
First check that the extension category is set appropriately in the extension info.plist file to match what is being sent in the aps block of your push notification
Second check that the deployment target for the extension is <= to the iOS version of the device you're trying to run on.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With