android - 是否可以通过 APNS 向通过 FCM 生成的设备令牌发送推送通知?
问题描述
在项目中,我使用 FCM 为 IOS 和 Android 生成设备令牌。并推送通知。在我的研究中,我发现推送通知可以发送https://fcm.googleapis.com/fcm/send
但是是否可以通过使用 APNSapi.sandbox.push.apple.com
向 FCM 生成的令牌发送推送通知到 IOS 设备?
苹果文档链接
解决方案
不能。Api.sandbox.push.apple.com 只能与 Apple 生成的令牌一起使用。您需要使用 didRegisterForRemoteNotificationsWithDeviceToken 在客户端中获取 Apple 令牌并将其发送到您的服务器。顺便说一句,Firebase SDK 正是这样做并获取此令牌以发送 iOS 通知。对于每个 FireBase 令牌,他们从设备中获取相关的 Apple 令牌并在连接到 Apple 服务器时使用它。
推荐阅读
- reactjs - 使用 jwt 登录表单并做出反应
- r - 如何从 ggplot2 中 x 轴的 %m 中删除前导零
- marklogic - MarkLogic 中过滤搜索结果的深度分页
- node.js - 通过别名而不是 IP 地址访问 LAN 服务器上的 Node.js 应用程序
- react-native - 从 Axios 获取基本 URL - 反应原生
- elasticsearch - 来自另一个查询的弹性 DSL 查询结果
- python-imaging-library - 在 python 3.7 Mac OS 中使用 Pillow?
- angular - 在角材料表的每一行中添加图标作为按钮
- javascript - 返回 Axios 数据,以便我可以使用它
- .htaccess - 使用 htaccess 将所有图像从旧域重定向到新域