apple-push-notifications - Safari 网站通知不起作用 (PushSharp)

标签 apple-push-notifications pushsharp osx-mavericks

我正在使用 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/

相关文章:

ios - UNNotificationServiceExtension 不适用于 iPhone 5 (iOS 10)

ios - 收到 APNS 通知但不显示

node.js - ( Node :6261) MaxListenersExceededWarning: Possible EventEmitter memory leak detected

ios - 无法通过临时分发的 pushsharp 发送推送通知

xcode5 - xcode5.0.1 + mac os 10.9 的协同设计错误

ios - 限制 iOS 远程通知的数量

c# - PushSharp 默认情况下是否并行调用 APNs?

google-cloud-messaging - 什么是 Google Cloud Messaging (GCM) 的 AUTH-TOKEN?

apache - 在 Mac OSX 10.9 "Mavericks"上安装 mod_mono

iphone - Mavericks iOS 模拟器中的推送通知