Commit
…equesters to notifications package (#8486) # Why Fixes https://github.com/unimodules/react-native-unimodules/issues/136. This is what we wanted to do anyway—move code responsible for permissions to respective modules. # How - removed `EXUserNotificationPermissionRequester` as it was left only as a fallback for when `expo-notifications` is not installed. Now that in Expo Client `expo-notifications` will be installed, this class would never be used. - moved remote notification permission requester from `expo-permissions` to `expo-notifications`, effectively removing support for calling `askAsync(Permissions.NOTIFICATIONS)` from `expo-permission` if `expo-notifications` is not installed - while moving I write a way for the requester to receive callbacks about permission being accepted or declined. I used a `UIApplicationDelegate` singleton module to which requesters can register to receive callbacks. - since new notification permission requesters now may return `null` inside the permission response I had to either: - add support for `NSNull` in `EXPermissionsManager` (it is returned by the user notifications permissions requester) - exclude `notifications` and `userFacingNotifications` from being saved to kernel service since we don't scope them even so (thanks @lukmccall for the tip!) We decided to stick to the second idea. # Test Plan - [x] Ran Expo Client on an ExpoClient-less device, fetched and asked for both notification-related permissions.
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
This file was deleted.
This file was deleted.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
This file was deleted.
This file was deleted.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.