使用AWS Pinpoint从iOS发送推送通知

时间:2018-07-29 00:42:24

标签: ios aws-pinpoint

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

除了AmazonPinpointClient之外,我都能在iOS上找到所有等效的类。

在iOS上使用什么对应的类?

2 个答案:

答案 0 :(得分:1)

我发现该类可以发送直接消息:

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

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

希望它可以节省一个人的时间。

答案 1 :(得分:0)

您使用的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

相关问题