Closed giaset closed 4 years ago
Is there any chance it will be merged in near future?
EDIT: One thing I noticed that this PR does not include clearAllState
method which is being used when user logs out - https://pusher.com/docs/beams/guides/publish-to-specific-user#deauthenticating-when-a-user-logs-out
Any chance it will be added here as well?
I have integrated this one into #48; added clearAllState
as well. :)
Appreciate everyones work here and apologies again for not being able to reasonably maintain this repo. @stephenkiers now that #48 is merged can you confirm that this PR is not needed?
Yes, it has been a while, but I am very sure that this functionality is in master already now. @adelowo do you want to confirm? I'd say close this PR and re-open if @adelowo says I implemented incorrectly.
thanks
Hi,
Thank you for this PR. I have a question : Is it any way of generate a beams token in the app ? We juste need instance Id et private key. I tried to install the node library but it look it doesn't work.
Thank you
As of February 2019, Pusher Beams supports delivering personal push notifications to authenticated users (announcement here: https://blog.pusher.com/authenticated-users-pusher-beams/).
To do so, you need to identify users using the
setUserId
method on the PushNotification singleton -- we've gone ahead and implemented this call for both Android and iOS.RCT_EXPORT_METHOD doesn't support passing a TokenProvider object from JS to native code, so we fetch the Beams token (string) in our React code and pass it to the native method. The native method then creates a LocalTokenProvider that implements Pusher's TokenProvider protocol and simply returns the stored token.