推送通知如何工作以及它的要求是什么?
我想知道如何让我的应用程序使用推送通知服务。我阅读了指南,但没有找到有关它的详细信息。有人可以告诉我一个简单的方法,它是如何工作的,有什么要求,如何我可以在我的应用程序中应用这个吗?我想知道一件事,根据指南,提供商和 APN 之间的连接必须是异步的,这是什么意思?我还读到,如果我们不断连接和断开 APNs 将阻止 IP。那么断开连接后连接APN的最小时间差是多少。请根据问题指导我。谢谢
i want to know how do i enable my application to use push notification service.i read the guide but doesn't find it much detailed information about it.Could someone tell me an easy way that how it works,what are the requirements,how do i apply this in my app. one thing i would like to know that according to guide the connection between provider and APNs must be asynchronous,What does it mean? also i read that if we continuously connect and disconnect APNs will block the IP. so what is the minimum time difference to connect to APNs after disconnecting.Please guide me in according to the question.thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
首先,网上有很多关于如何执行此操作的教程。
但基础知识如下:
一个。创建一条有效负载消息,您的应用程序可以使用该消息执行某些操作。
b.包含您想要向其发送通知的 iPhone 的 deviceToken。
c.将原始数据(有关格式的具体信息,请参阅 Apple 文档)写入每条消息的套接字。
Apple 所说的“异步”是指 APN 不会向您的任何数据发送响应以确认它。因此,您需要确保您用于连接的任何网络库都可以支持原始数据连接。
我认为我没有看到任何已发布的有关最短连接时间的指南。我认为 Apple 的注释更具体地旨在确保您批量发送消息,而不是恶意地淹没 APN。我怀疑如果他们觉得你越界了,他们会首先联系你。
再次,我建议您在 Google 上快速搜索“iphone 推送通知教程”,以获取可以进一步指导您的详细信息。
希望这对您有所帮助。
First off, there are quite a few tutorials out on the net for how to do this.
But here's the basics:
a. Create a payload message that your app can do something with.
b. Include the deviceToken for the iPhone you want to send notifications to.
c. Write the raw data (see Apple's docs for specifics on the format) to the socket for each message.
What Apple means by "asynchronous", is that the APNs will not send a response to any of your data acknowledging it. So you need to make sure that whatever networking library you're using to connect can support raw data connections.
I don't think I have seen any published guidelines for minimum time between connections. I think Apple's note is more specifically directed to ensure that you're batching your messages and not flooding the APNs maliciously. I suspect that they'll contact you first if they feel you're overstepping the bounds.
Again, I would suggest a quick Google search on "iphone push notification tutorial" for specifics that can guide you further.
Hope this helps you on your way.