Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sns.createPlatformEndpointAsync({
- PlatformApplicationArn: applicationArn,
- Token: deviceId,
- });
- /* send the notification (not needed) */
- sns.publishAsync({
- MessageStructure: "json",
- Message: JSON.stringify({
- APNS: JSON.stringify({
- aps: messageJson
- }),
- TargetArn: deviceArn,
- });
- /* subscribe device to topic */
- sns.subscribeAsync({
- Protocol: 'application',
- TopicArn,
- // Acquired from `createPlatformEndpoint`
- Endpoint,
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement