drc15469 2015-09-22 22:26
浏览 164
已采纳

使用AWS SNS将推送通知发送到特定的APNS令牌

I'm trying to send a basic APNS push notification to a specific APNS token using AWS SNS. All the examples I'm finding are how to store the token in SNS, subscribe to channels, and publish to channels.

I don't need that kind of usage with the application I'm building. The golang application decides which users a push needs to be sent to for which actions. Then it looks up the tokens for those users in the DB. All I need is a basic request to send a push notification to that token (preferably asynchronously).

Here is one of the examples I've looked at: http://docs.aws.amazon.com/sdk-for-go/api/service/sns/SNS.html#Publish-instance_method

  • 写回答

1条回答 默认 最新

  • donglao4370 2015-09-23 08:53
    关注

    To use the Publish action for sending a message to a mobile endpoint, such as an app on a Kindle device or mobile phone, you must specify the EndpointArn. The EndpointArn is returned when making a call with the CreatePlatformEndpoint action.

    The easiest way of getting the EndpointArn would be to store it along with or instead of the APNS token in your DB, assuming you are using CreatePlatformEndpoint. Otherwise have a look at this question: Amazon SNS: How to get EndpointArn by token(registrationId) using amazon .net sdk?

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突
  • ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大
  • ¥15 import arcpy出现importing _arcgisscripting 找不到相关程序
  • ¥15 onvif+openssl,vs2022编译openssl64