Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: promptForPushNotificationsWithUserResponse does not fire after a user tries to resubscribe on IOS #971

Open
2 of 3 tasks
maxmandia opened this issue Feb 2, 2024 · 1 comment

Comments

@maxmandia
Copy link

maxmandia commented Feb 2, 2024

What happened?

Hi 👋

When a user unsubscribes from push notifications we successfully see the user is unsubscribed in OneSignal, however, if we go to our app settings, we see that push notifications are still turned on.

After we perform the steps above, we try to re-subscribe the user using the following logic:

OneSignal.promptForPushNotificationsWithUserResponse(true)

where we expect the user to be prompted to turn notifications on in there settings. However, nothing seems to be happening, and the user is still unsubscribed in OneSignal.

Steps to reproduce?

1. Install "onesignal-cordova-plugin": "^3.3.0"
2. Use a toggle with the code snippet above.

What did you expect to happen?

We excepted the user to be prompted to open their settings to turn notifications back on.

OneSignal Cordova SDK version

3.3.0

Which platform(s) are affected?

  • iOS
  • Android

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@emawby
Copy link
Contributor

emawby commented May 20, 2024

@maxmandia You say that the user unsubscribes from push notifications but the permissions are still on. How is the user unsubscribing from push notifications? promptForPushNotificationsWithUserResponse is intended to set the value that you checked in the application settings, so since they still have permissions granted it won't do anything. If you are using the disablePush method then you should set that to false to resubscribe the user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants