【问题标题】:How do I use Firebase with Expo如何将 Firebase 与 Expo 结合使用
【发布时间】:2020-12-19 09:20:41
【问题描述】:

目前 Expo 仅支持 Android 和 iOS 的推送通知。如何使用 Firebase 实现推送通知?

【问题讨论】:

    标签: node.js react-native expo react-native-web


    【解决方案1】:

    要为 Expo web 实施 Firebase,您需要执行以下操作:

    1. 确保您至少使用 Expo 39.0.4。见How to avoid loading Expo notifications bundle for web build?
    2. 确保您使用的是最新版本的 Firebase npm install firebase@latest
    3. 使用expo customize:web 创建您的register-service-worker.js 文件
    4. 使用以下 Github 存储库作为参考更新您的代码:expo-fcm-pwa

    【讨论】:

      猜你喜欢
      • 2022-06-25
      • 1970-01-01
      • 2020-11-27
      • 2020-04-29
      • 1970-01-01
      • 2018-01-17
      • 2018-07-04
      • 2019-04-21
      • 2021-04-24
      相关资源
      最近更新 更多