invertase / react-native-notifee

Moved to https://github.com/invertase/notifee
https://invertase.io/blog/open-sourcing-notifee
Other
465 stars 31 forks source link

How to override ios push permission settings #325

Closed aklevko closed 3 years ago

aklevko commented 3 years ago

I’m trying to override ios push permission settings for remote notifications. My app already has authorizationStatus is ENABLED i.e. the user has accepted permission. After that I tried to use notifee.requestPermission({ sound: false }) but it didn't work… notifee.getNotificationSettings() always returns sound with status 1

How to override already installed settings for ios? My goal is to enable/disable sound for push notification from one of my user settings screens inside the app.

helenaford commented 3 years ago

From what I understand about permissions, it's not possible to reset them. But, you could navigate the user to the settings screen and ask them to manually reset the sound, or store something in your app that remembers their preference.

So if user A wants sound disabled, don't set the sound when calling displayNotification, or if you need to know it for remote notifications, store their preference remotely in your database.

Hope that answers your question.