Promise hangs after asking for Notification Permission

#1

On iOS standalone SDK 25, my code does not execute after requesting the Notification permission. It seems as though the promise is hanging. This seems to only affect the “Notification” permission.

For example:

console.log('Before' )
notifications = await Permissions.askAsync(Permissions.NOTIFICATIONS)
console.log('After', notifications )

“Before” is logged and I get the iOS alerts but “After” does not get logged.

I saw this thread: https://github.com/expo/expo/issues/101 but I believe this is something different (maybe related). Instead of the promise hanging on rejection, it seems to hang all the time.

#2

Does adding the existingStatus check from the example on https://docs.expo.io/versions/latest/guides/push-notifications.html#content resolve it?

#3

Sorry for the late reply! I just tried implementing the existingStatus check, but it is still having the same problem. If no one else is encountering the same thing, I’m thinking it might be because I’m using OneSignal. OneSignal has an event listener to get the Push Tokens. After getting permissions, the OneSignal listener fires, but then nothing executes afterward.

closed #4

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.