You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Could you share the following details, I was unable to reproduce the issue
Do you have any other SDKs installed?
What devices are you seeing this issue on and what version of iOS are they using?
Could you reproduce this issue in a new project and share it with us?
I found the problem. I was calling OneSignal.User.PushSubscription.OptIn(); before calling OneSignal.Notifications.RequestPermissionAsync(true). I think "OptIn" shows permission prompt, if called first. I don't know this is a bug or by design.
OptIn() will display the permission prompt if the user hasn’t been prompted. If the user has already been prompted and the app’s settings has notifications permission disabled, the user will see a prompt to direct them to the settings app.
We created OptIn() as a shorthand method for developers to use. OneSignal.Notifications.requestPermissionAsync() can be used for more control.
Let me know if you have any questions
And thanks for the feedback, I plan on updating our documentation to make this more clear.
What happened?
SDK automatically shows iOS permission prompt without calling OneSignal.Notifications.RequestPermissionAsync(true)
Steps to reproduce?
What did you expect to happen?
The prompt should NOT be shown.
Unity version
2022.3.2f1
OneSignal Unity SDK version
5.0.2
Platform
iOS
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: