How to reset notifications permissions

Platform: iOS

I am using expo notifications and have implemented a similar flow as listed in the Notifications article, but want to test how the new flow I wrote works.
The issue is that I cannot find how to reset the expo notifications permission easily.

I found this article in the Expo Forums that lists a way to do it, but that requires 2 restarts of my phone, which is not ideal for a development environment.

When doing the call:

const status = await Notifications.getPermissionsAsync();

the “status” object looks like this:

Object {
  "canAskAgain": false,
  "expires": "never",
  "granted": false,
  "ios": Object {
    "alertStyle": 0,
    "allowsAlert": false,
    "allowsAnnouncements": null,
    "allowsBadge": false,
    "allowsCriticalAlerts": null,
    "allowsDisplayInCarPlay": null,
    "allowsDisplayInNotificationCenter": false,
    "allowsDisplayOnLockScreen": false,
    "allowsPreviews": 1,
    "allowsSound": false,
    "providesAppNotificationSettings": false,
    "status": 1,
  },
  "status": "denied",
}

Above is an example of output after I have denied a request. But how do I set the “canAskAgain” flag to true without having to delete the expo app, restart my phone, set my time to +1 day, restart my phone again, and then reinstalling expo go?

Hey @akumau1, there is no easy/elegant way to do this unfortunately.

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