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]: Value of fallbackToSettings is not respected #1035

Open
2 of 3 tasks
joeczucha opened this issue Nov 28, 2024 · 0 comments
Open
2 of 3 tasks

[Bug]: Value of fallbackToSettings is not respected #1035

joeczucha opened this issue Nov 28, 2024 · 0 comments

Comments

@joeczucha
Copy link

joeczucha commented Nov 28, 2024

What happened?

We are using requestPermission(fallbackToSettings) to request notification permissions from the user. According to this page, a "notifications are disabled" message should only be displayed if the value of the parameter is set to true.

fallbackToSettings- option to display a prompt informing your users to re-enable notifications for the app after they've denied permissions when showing a push prompt is disallowed.

However, when setting to false, a prompt is still displayed if notifications are disabled

CleanShot 2024-11-28 at 12 09 27@2x

I found a similar issue here in the React Native repo and this was due to the value of fallbackToSettings not being correctly cast as a boolean (see PR with fix here). However, as far as I can see, this is already being done in the Cordova SDK.

Steps to reproduce?

1. Install version 5.2.6 of `onesignal-cordova-plugin`
2. Initialize OneSignal with `OneSignal.Notifications.requestPermission(false)`
3. Build the app, sync over to a device
4. Disable notifications in IOS settings
5. Close and reload the app

What did you expect to happen?

The app should not display a message saying that notifications are disabled.

OneSignal Cordova SDK version

5.2.6

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
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

1 participant