xcode 如何在 Mac 上使用 Apple 推送通知?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19679088/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to Use Apple Push Notification on Mac?
提问by Kimpoy
I'm a newbie in OSX development.
我是 OSX 开发的新手。
I'm developing an app in mac which requires receiving notifications similar to the iOS APNS. I am fully aware of the Growl Framework, however many suggested that in order to avoid any future compatibility and/or support issue with Growl, using the Apple Push Notifications (applicable for Apps from Lion onwards) would be better. Can you suggest a way on how to do this or give some important tutorial regarding this.
我正在 mac 中开发一个应用程序,它需要接收类似于 iOS APNS 的通知。我完全了解 Growl 框架,但是许多人建议为了避免未来与 Growl 的任何兼容性和/或支持问题,使用 Apple 推送通知(适用于 Lion 以后的应用程序)会更好。您能否建议一种如何执行此操作的方法或就此提供一些重要的教程。
Thank you for your help!
感谢您的帮助!
回答by Nikos M.
Apples own documentation is the best place to start:
苹果自己的文档是最好的起点:
https://developer.apple.com/notifications/
https://developer.apple.com/notifications/
Lots of documents there as well as videos from WWDC regarding mac notifications and sample code. In general the implementation is very similar to ios push.
那里有很多文档以及来自 WWDC 的关于 mac 通知和示例代码的视频。一般来说,实现与 ios push 非常相似。