我正在使用 PushSharp 库来推送 iOS 通知(它已经运行了半年),现在我正在尝试将功能扩展到新的 Mac OS Maverick 功能 (https://kandutech.net/)。似乎 PushSharp ( https://github.com/Redth/PushSharp ) 目前不支持此功能,所以我自己扩展了 PushSharp 库。
URL (gateway.push.apple.com:2195) 似乎与 iOS Distribution 相同,但 JSON 负载略有不同。我调整了JSON格式。在推送过程中看不到其他差异。我错过了什么吗?
还是不行。我正在获得许可,设备 token ,服务器端的推送过程看起来很好(没有发生错误),但通知中心没有弹出任何内容。有什么想法吗?
最佳答案
事实证明,即使不需要 url 参数,也必须提供 url-args
。我错过了。此有效负载有效:
{"aps":{"alert":{"title":"GAGARIN","body":"POEHALI!!!!"},"url-args":[]}}
决定不删除这个问题,希望它能帮助到别人。
关于apple-push-notifications - Safari 网站通知不起作用 (PushSharp),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19506265/