开发和生产SSL证书

开发和生产SSL证书

本文介绍了iOS中的开发和生产SSL证书有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这也许是一个奇怪的问题,但这确实使我感到困惑.为什么我们必须为iOS中的推送通知创建开发和生产SSL证书?开发证书和生产证书有什么区别?

This is maybe a strange question but it is really confusing me. Why do we have to create a development and a production SSL certificate for push notifications in iOS? What is the difference between the development and the production certificates?

我正在开发一个带有Push通知的iOS应用(由自托管的Parse Server处理),当我从开发环境切换到生产环境(带有生产证书)时,我不再收到推送通知设备.将这个应用程式上载至应用程式商店后,它会运作吗?还是我可以测试"我的生产环境,以确保通知一旦在应用商店中发布后便可以在我的应用中正常工作?

I am developing an iOS app with Push notifications (handled by a self-hosted Parse Server) and when I switch my environment from development to production (with a production certificate), I don't receive the push notifications anymore on my devices. Will it work once I upload this app to the app store (then, it will be in production)? Or can I "test" my production environment to be sure the notifications will work in my app once published on the app store?

推荐答案

Apple使用不同的服务器向应用程序的开发版本和应用程序商店版本发送推送通知.开发版本称为Sandbox. iOS根据其开发版本还是生产版本保持与推送服务器的持久连接.根据您的应用程序签署的证书(Dev或App Store/Ad Hoc),它将创建与各个推送服务器的持久连接.由于两台服务器不同,因此它们将需要不同的SSL证书才能建立到服务器的安全连接.

Apple uses different servers for sending push notifications to development versions and app store versions of the app. The development version is called Sandbox. The iOS maintains persistent connection to the its push servers depending on whether its development version or production version. Based on which certificate your app is signed (Dev or App Store/Ad Hoc) it will create a persistent connection to the respective push server. Since the two servers are different they will need different SSL certificates to establish a secure connection to the server.

有关更多信息,请参见:

For more info refer:

https://developer.apple.com/library/ios/technotes/tn2265/_index.html

这篇关于iOS中的开发和生产SSL证书有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-01 17:37