Route iOS notification settings intent into the app (#11003)

This commit is contained in:
Samuel Newman
2026-06-30 22:23:52 +03:00
committed by GitHub
parent de51ceb577
commit 52aaba4051
6 changed files with 97 additions and 6 deletions
@@ -82,7 +82,19 @@ export function NotificationSettingsScreen({}: Props) {
const onRequestPermissions = async () => {
if (IS_WEB) return
if (permissions?.canAskAgain) {
const response = await Notification.requestPermissionsAsync()
const response = await Notification.requestPermissionsAsync({
ios: {
/*
* These default to true only when no argument is passed, so set them
* explicitly to preserve behavior alongside
* provideAppNotificationSettings.
*/
allowAlert: true,
allowBadge: true,
allowSound: true,
provideAppNotificationSettings: true,
},
})
queryClient.setQueryData(RQKEY, response)
} else {
if (IS_ANDROID) {