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]: fallback alert is always shown on iOS #1664

Open
2 of 3 tasks
vargajacint opened this issue Mar 13, 2024 · 3 comments
Open
2 of 3 tasks

[Bug]: fallback alert is always shown on iOS #1664

vargajacint opened this issue Mar 13, 2024 · 3 comments

Comments

@vargajacint
Copy link

vargajacint commented Mar 13, 2024

What happened?

I have observed that even after explicitly setting the parameter to false in the method call OneSignal.Notifications.requestPermission(false);, iOS still presents a fallback alert. Additionally, the function returns an array that contains a boolean value on iOS, instead of returning a boolean value directly.

Everything is working correctly on Android as per the documentation.

Versions:
react-native-onesignal: 5.1.0
OneSignalXCFramework: 5.1.3

Steps to reproduce?

1. Request permission in the following way: `const result = await OneSignal.Notifications.requestPermission(false);`
2. Cancel the permission access
3. Observe a fallback alert that points to the Settings app
4. Observe the `result` type is Array on iOS

What did you expect to happen?

Not present the fallback alert if I call the function with false value. Also, the return value should be boolean on iOS as well

React Native OneSignal SDK version

5.1.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
@jennantilla
Copy link
Contributor

Hello @vargajacint thanks for reaching out! We are looking into this.

@CFerndp
Copy link

CFerndp commented Mar 27, 2024

I'm suffering the same issue here. Pending to be resolved

@prdjed
Copy link

prdjed commented May 14, 2024

Until this is fixed I use:

if(Platform.OS==='android'){
    OneSignal.Notifications.requestPermission(false);
  }else{
    OneSignal.Notifications.requestPermission();
  }

since on IOS it works if no arguments are present. And on android it must have argument.

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

4 participants