FCM 在哪里保存博览会代币?

发布于 2025-01-14 21:49:46 字数 103 浏览 3 评论 0原文

仍然没有实现将世博令牌保存在数据库中的方法,但从 FCM 控制台可以向所有下载了我的应用程序的设备发送通知。 FCM 是否会以任何方式保留代币?如果确实如此,它会将它们存储在哪里?无法找到他们

Still haven't implemented a way for expo tokens to be saved on a database, but from FCM console can send notifications to all devices that have downloaded my app. Does FCM keep the tokens either way? And if it does where does it store them? Unable to find them

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

指尖上得阳光 2025-01-21 21:49:46

据我所知,当我们通过控制台发送通知时,我们无法检索 FCM 在后端使用的令牌或数据。
在一个裸露的React Native项目中,方法是将令牌保存在数据库中(例如:Firestore)。因此,当您需要发送通知时,您可以获取相应的令牌来使用它。希望世博会也如此。
总而言之,您必须将令牌存储在某个地方(并在令牌发生变化时更新它)才能实现您的目标。

AFAIK we can't retrieve the tokens or the data that FCM uses in its backend when we send a notification through the console.
In a bare React Native project, the way is to save the token in a database (eg : Firestore). So when you need to send a notification you can grab the respective token to use it. Hope this is same for expo also.
To summarise you'll have to store the token somewhere(also update it whenever it changes) to achieve your goal.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文