-
Notifications
You must be signed in to change notification settings - Fork 374
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]: 5.0.0 types #1540
Comments
Howdy @rares-lupascu , Thanks for bringing this to our attention. Enjoy! |
Still the issue exits, in react-native Android it is working fine, we are able to set external id's. But working with ios, app is getting initialized, but not able to set external id's. for initializing app: OneSignal.initialize(id); OneSignal.Notifications.requestPermission(true); OneSignal.Notifications.addEventListener("click", (event) => { and for setting external id: OneSignal.login(EXTERNAL_ID); |
it is no a pb with the docs only ... typescript throws an error ... so it is possible that the types were not updated |
in the docs
returns a boolean value not a Promise ... so why should we await it? further more hasPermission() return object on iOS (at least) when permissions have not been granted:
|
I'm having a similar issue when reading the migration guide and the mobile SDK guide. In the mobile SDK guide, under react-native it says: Same with: |
Hi all, thank you for pointing out these inconsistencies with the migration guide. We are fixing the migration guide. OneSignal.Notifications.hasPermission()
OneSignal.User.pushSubscription.getPushSubscriptionId()
OneSignal.User.pushSubscription.getPushSubscriptionToken()
OneSignal.User.pushSubscription.getOptedIn() Additionally, we will need to fix the permission boolean (it is an object and need to be fixed). @manoharkharvi43 - Can you explain the issue you have with iOS when logging into an external_id? What is the error? @KodyKendall - Change the casing of |
Hi ,
I am using one signal for push notification and in app notification(in app
pop-up), it is working in both IOS and and Android. But the issue is while
setting an external-id.
In android i am able to set external-id, it is working. But when it comes
to IOS it is not setting.
I am using a one-signal version : v5 (5.0.0)
I am using the onesignal.login() function to set external-id.
…On Thu, 7 Sept 2023 at 04:19, Nan ***@***.***> wrote:
Hi all, thank you for pointing out these inconsistencies with the
migration guide.
We are fixing the migration guide.
There is no need to await any of these calls:
OneSignal.Notifications.hasPermission()OneSignal.User.pushSubscription.getPushSubscriptionId()OneSignal.User.pushSubscription.getPushSubscriptionToken()OneSignal.User.pushSubscription.getOptedIn()
Additionally, we will need to fix the permission boolean (it is an object
and need to be fixed).
@manoharkharvi43 <https://github.com/manoharkharvi43> - Can you explain
the issue you have with iOS when logging into an external_id? What is the
error?
@KodyKendall <https://github.com/KodyKendall> - Change the casing of
pushSubscription to OneSignal.User.pushSubscription.optIn(). This was one
of the changes we made after the beta releases.
—
Reply to this email directly, view it on GitHub
<#1540 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AM4WEGCDEQSXE52SSLYYTSDXZD4XXANCNFSM6AAAAAA3XJKI7U>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi @manoharkharvi43, can you turn on verbose logging by Hi @Romick2005 yes the identity object needs to be string values, thanks for catching this error in the type. |
@ KodyKendall it's not with |
@arnaudambro @rgomezp Anyone please help me how get player id / External ID react native oneSignal version 5+ const state = await OneSignal.getDeviceState(); this is not working |
All type errors, documentation, and migration guide inconsistencies reported in this issue have since been fixed. @FazilMuhammed
|
What happened?
which ones are correct?
or
the migration guide says the first ones are correct ... typescript says the second
Steps to reproduce?
What did you expect to happen?
accurate types def
React Native OneSignal SDK version
5.0.0
Which platform(s) are affected?
Relevant log output
Code of Conduct
The text was updated successfully, but these errors were encountered: