I'm using react-native-permissions library to request permissions in our react-native app.
Currently I'm implementing push notification. For Android I can request Push Notification Permission with native modal using request(PERMISSIONS.ANDROID.POST_NOTIFICATIONS)
. But for iOS I don't see a way to request push permission.
But
await checkNotifications()
.then(({ status, settings }) => {
console.log('CHECK STATUS: ', status);
console.log('CHECK SETTINGS: ', settings);
})
.catch((err) => console.log('CHECK ERROR: ', err));
works though it doesn't open the modal. How can I request the push permission in iOS ?
Found it. It can be done with
RNPermissions.requestNotifications
method