【发布时间】:2018-06-14 15:10:13
【问题描述】:
我使用适用于该 JSON 的 Pusher 创建了静默推送通知:
{
"aps" : {
"content-available" : 1
},
"acme1" : "bar",
"acme2" : 42
}
这里重要的是内容可供 1 获取。
我现在的问题是在 AeroGear UnifiedPush Server & Docker 中使用它,但是当我构建我的 JSON 时,我无法放置这些密钥。
我试过这个没有成功:
curl -u "c94ab6da-17e1-4c35-b17f-1ab482152a65:57781ef0-9105-440d-b902-217461c0e743" -v -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{
"message": {
"alert": "Hello from the curl HTTP Sender!","content-available": true
}}' http://localhost:18081/rest/sender
它返回一个错误:
Unrecognized field "content-available" (class org.jboss.aerogear.unifiedpush.message.Message), not marked as ignorable
Documentation
如何在 iOS 中使用 AeroGear UnifiedPush 服务器发送推送通知?
【问题讨论】:
标签: ios push-notification apple-push-notifications aerogear