Dav
Dav
The method `hasPermission` has only been part of react-native-onesignal since v5, v4 did not so you could not have been using it since v4. I'm not sure I understand your...
@rakshitbharat where do you have the checkNotificationPermissions function? Is this inside a react component? Is that react component rendered on app start or is it conditional on a click or...
In that case can you try to replace your whole `checkNotificationPermissions` function above with the following and try again: ```ts // Set the `permissionGranted` on first load based on device...
I can confirm this is working exactly as intended, thanks @jennantilla 🎉 ```ts useEffect(() => { const setInitialPermission = async () => { const granted = OneSignal.Notifications.hasPermission(); const granted2 =...
I am seeing the same thing as @eightyfive where the `hasPermission` gives false on app load, but making an edit and saving forces expo to reload the app and it...
My solution which seems to work is adding a timeout, try the following code and let me know if it also works for you: ```ts // Set the `permissionGranted` on...
I would also like to know of a way to achieve this without adding some ts-ignore
I am also seeing this behaviour on expo v48 (development build and standalone app) and it is a big friction point as I can never be sure if the native...
I think I've found a workaround @itsramiel, `requestPermission()` from the `useForegroundPermissions` hook returns a promise, so await or chain a then on that and the response is correct with the...
Has anyone confirmed if this is working as expected in Expo v50? Not sure why this issue was closed