如何在 ios 中隐藏推送通知?我需要将推送通知转换为本地通知。有效载荷的结构应该是什么?
最佳答案
https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/ApplePushService.html 您可以引用上面的链接了解推送通知的有效载荷。 为了不显示推送通知,您需要在没有警报的情况下传递有效负载。如果您想要静默通知,请将 Content-available 设置为 1。这会有所帮助。
例如:
{"aps" : {
"content-available" : 1
},
"YourData":""
}
关于ios - 如何在 ios 中隐藏推送通知?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29361424/