Post

Replies

Boosts

Views

Activity

Reply to Notification requestPermission always returns denied
I'm having the same problem in 16.4 simulator. After adding the app to home screen and running: try { const permission = await Notification.requestPermission(); console.log('Successfully handled permission', permission); } catch(e) { console.error('Failed to register notification', e); } ...I get back simply denied. Safari does not ask for the notification. This code works on every single modern except iOS Safari. 😢 If I try to run pushManager.subscribe() anyway, I get NotAllowedError: User denied push permission, so the status seems to be correct. Also I do have a web manifest file with display: standalone, the only difference is mine uses the new .webmanifest format. Safari picks upp all the properties in the file correctly so I don't think it's related. <link rel="manifest" href="/manifest.webmanifest" />
Apr ’23