Reputation: 635
According to the official react-native-firebase docs you can use the method requestPermissions() for ios to prompt the user about accepting notifications, but how can I check if the user declined it or not since said method returns void?
Upvotes: 0
Views: 1012
Reputation: 6304
Looks like the docs incorrectly state that it returns void, it actually returns a promise that resolves with an object - we'll get the docs updated.
On iOS 9 or below, there's no way to tell whether the user accepted or rejected the permissions popup - in this case the object will have a property called status
with a value of "unknown"
In all other cases the object will have a granted
property which is a boolean value of true/false.
EDIT: I've updated the docs to reflect the above.
Upvotes: 1