Send push notification from iOS using AWS Pinpoint

匆匆过客 提交于 2020-05-26 07:59:16

问题


I am using AWS SDK to send push notifications to devices using direct messages. I was able to send message on Android using AmazonPinpointClient(creds).sendMessages(sendMessagesRequest).

I can find all equivalent classes on iOS except the AmazonPinpointClient.

What's the corresponding class to use on iOS?


回答1:


I found the class to send direct messages:

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

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

Hope it saves someone's time.




回答2:


The AWS SDK you are using is not Pinpoint mobile SDK. (Probably you are using Pinpoint Java SDK)

There is no Android SDK or iOS SDK has sendMessages method.

Pinpoint Mobile SDK can only send events and update endpoint.

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



来源:https://stackoverflow.com/questions/51576333/send-push-notification-from-ios-using-aws-pinpoint

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!