react-native-onesignal icon indicating copy to clipboard operation
react-native-onesignal copied to clipboard

[Bug]: calling requestPermission() returns array with boolean

Open Redn4s opened this issue 2 years ago • 1 comments

What happened?

When requesting the push permission on iOS the response is an array instead of a boolean.

OneSignal.Notifications.requestPermission(false).then((accepted) => {
	console.log(accepted); // [true] of [false]
});

Steps to reproduce?

1. Install v5.0.4 of react-native-onesignal
2. Call `requestPermission(false)`

What did you expect to happen?

I expect the requestPermission method to return a boolean instead of an array.

React Native OneSignal SDK version

5.0.4

Which platform(s) are affected?

  • [X] iOS
  • [ ] Android

Relevant log output

No response

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

Redn4s avatar Dec 11 '23 13:12 Redn4s

@Redn4s thanks for reaching out! We'll look into this!

jennantilla avatar Dec 22 '23 00:12 jennantilla