Hello I have an application with several webviews. I would like to intercept web notifications for print in the console.
I have already written a javascript code for intercepting web notification and print.
The problem is that I feel that we can not enable web notification in a WKWebview. When I inject
window.Notification.permission
i get alway
default
or
denied
. I will like get
granted,
how can I do to enable the webview for permission?
I just need to know how to allow
window.Notification
because all the rest of my code is ready, that's the only thing I miss.
I know that with the UIWebview it is possible but it is deprecated so I do not want to use it. For UIWebview there is a private API
WebNotificationProvider
, is there the equivalent for WKWebview?
I've been looking for a few weeks and can not find a solution