SNS Mobile 推送通知极度混乱

SNS Mobile push notifications extremely confused

现在我正在尝试在有人向 SNS 发布消息时向我的 phone 发送移动推送通知。我对必须使用哪些服务感到困惑。我是否必须使用像 Firebase Cloud Messaging/GCM 这样的第三方服务来发送移动推送通知?或者我可以直接从 SNS 发送到我的 phone。

在 AWS 文档中,这对我来说有点矛盾。

https://docs.aws.amazon.com/sns/latest/dg/sns-mobile-application-as-subscriber.html

它说:

To begin using Amazon SNS mobile push notifications, you need the following:

A set of credentials for connecting to one of the supported push notification services: ADM, APNS, Baidu, FCM, MPNS, or WNS.

A mobile app that is registered and configured to use one of the supported push notification services.

也就是说我们必须使用第三方服务,对吗?但是在其中一个 AWS SNS 教程中:

https://docs.aws.amazon.com/sns/latest/dg/mobile-platform-endpoint.html

它说我们可以为我的移动设备创建一个平台端点,以便它可以接收推送通知。我非常困惑,我们必须使用第三方服务还是可以直接将 SNS 推送通知发送到我们的 phone?

我查了Whosebug,答案我也不清楚

Can Amazon SNS push notifications directly to mobile devices?

Amazon SNS Sending direct push notification to individual device

有人可以为我澄清一下吗?

AWS SNS 管理和提取不同的推送通知服务。

为了使 AWS SNS 能够使用适当的推送通知服务,它需要一个平台端点。它需要知道构建应用程序的平台(即 iOS)。

it says we can create a platform endpoint for my mobile device

要创建平台端点,您需要来自推送通知提供商的证书。

  • 示例:.p12 是来自 Apple 的证书,需要启用 "Push Notification" 功能。

创建平台应用程序后,该应用程序需要向 AWS SNS 注册一个唯一的设备令牌。

此设备令牌由iOS或Android生成,用于唯一标识设备。应用只有在由推送通知提供商的证书正确签名后才能生成设备令牌。

do we have to use a third party service

是的,您需要第三方服务来:

  1. 生成启用推送通知功能的证书
  2. 生成与您的物理设备关联的设备令牌
  3. 使用证书正确签署应用程序

or can we send SNS push notifications directly to our phone?

AWS SNS 通过将设备端点与正确的设备令牌匹配来为您管理这一点。然后调用适当的推送通知服务。 (即 APNS、GCM)。