简体   繁体   中英

Azure Server Script: Push Notification to iOS device: How to set content-available to 1?

Writing a script on Windows Azure cloud to send a Newstand notification to iOS device. The json body should include content-available set to 1. What is the syntax to set this property?

My code is below, however, when the notification arrives at the iOS device, the content-available is not present in the aps object.

push.apns.send(item.deviceid, { alert: "Position Check", badge: 1,
'content-available':1,
} ...

This question is regarding an Azure Mobile Service script in which NotificationHub support does not yet exist.

Update the code to:

push.apns.send(item.deviceid, { alert: "Position Check", badge: 1,
 'contentavailable':1,
 } ...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM