【问题标题】:Send push notification from iOS using AWS Pinpoint使用 AWS Pinpoint 从 iOS 发送推送通知
【发布时间】:2018-07-29 00:42:23
【问题描述】:

我正在使用 AWS 开发工具包通过直接消息向设备发送推送通知。我能够使用AmazonPinpointClient(creds).sendMessages(sendMessagesRequest) 在 Android 上发送消息。

我可以在 iOS 上找到除 AmazonPinpointClient 之外的所有等效类。

在 iOS 上对应的类是什么?

【问题讨论】:

标签: ios aws-pinpoint


【解决方案1】:

我找到了发送直接消息的类:

let sendMessagesRequest = AWSPinpointTargetingSendMessagesRequest()!
sendMessagesRequest.applicationId = appId
sendMessagesRequest.messageRequest = messageRequest

AWSPinpointTargeting.default().sendMessages(sendMessagesRequest){ response, error in 
        ...
}

希望它能节省别人的时间。

【讨论】:

  • 你是如何指定你的messageRequest的?大概它需要一个设备令牌、一个标题和消息正文才能开始吧?
【解决方案2】:

您使用的 AWS 开发工具包不是 Pinpoint 移动开发工具包。 (可能您正在使用 Pinpoint Java SDK)

没有 Android SDK 或 iOS SDK 有 sendMessages 方法。

Pinpoint Mobile SDK 只能发送事件和更新端点。

https://docs.aws.amazon.com/pinpoint/latest/developerguide/integrate-supported-sdks.html

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-03
    • 2017-12-29
    相关资源
    最近更新 更多