简体   繁体   English

我想为我的iPhone应用程序使用推送通知

[英]I want to use Push Notification for My app for IPhone

我想为我的应用程序使用推送通知服务,但是我不确定如何利用它,请帮助

you have a good tutorial for push notifications here explaining the server side implementation details: 您在这里有一个很好的推送通知教程,其中解释了服务器端实现的详细信息:
http://blog.boxedice.com/2009/07/10/how-to-build-an-apple-push-notification-provider-server-tutorial/ and here explaining the client side details: http://blog.boxedice.com/2009/07/10/how-to-build-an-apple-push-notification-provider-server-tutorial/,并在此处说明了客户端详细信息:
http://mobiforge.com/developing/story/programming-apple-push-notification-services http://mobiforge.com/developing/story/programming-apple-push-notification-services

Also here is the link to the Apple developer guide on local and remote push notifications: http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Introduction/Introduction.html 这也是指向本地和远程推送通知的Apple开发人员指南的链接: http : //developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Introduction/Introduction.html

Hope this helps. 希望这可以帮助。

To send remote push notifications using PHP, I suggest you take a look at the php-apns project on Google Code. 要使用PHP发送远程推送通知,建议您看看Google Code上的php-apns项目。 I've had good experience with it. 我对此有很好的经验。

You will have to enable push notifications on iTunes Connect, if you didn't do that already. 如果您尚未在iTunes Connect上启用推送通知,则必须启用它。 Your app will have to get the push notifications token from the OS, and deliver it to server. 您的应用必须从操作系统中获取推送通知令牌,并将其传递到服务器。 This token may change from one launch to another, so recommended way is to fetch the notification token at launch, and deliver it to the server. 此令牌可能会从一个启动更改为另一启动,因此建议的方法是在启动时获取通知令牌,并将其传递给服务器。 Server can then decide when it wants to deliver a notification to which device; 然后,服务器可以决定何时要将通知传递到哪个设备。 at that point, you use php-apns which will connect to Apple's server on port 2195 (make sure you have a hosting which allows that) and, using several certificates you also put on the server, communicate with it. 那时,您使用php-apns将其连接到端口2195上的Apple服务器(请确保您拥有允许该主机的主机),并使用还放置在服务器上的多个证书与之通信。

Make sure the certificates are not downloadable when you upload them on the server. 将证书上传到服务器时,请确保证书不可下载。

You cannot test push notifications on the Simulator. 您不能在模拟器上测试推送通知。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM