关于推送通知的一些问题?
我正在开发我的第一个 iPhone 应用程序,最后一部分是推送通知。这是我的第一个 iPhone 应用程序,也是我第一次处理推送通知。在开发阶段一切工作正常。现在我有一些关于制作阶段的问题。
- 开发推送SSL证书和开发推送SSL证书有什么区别 制作推送SSL证书?我可以使用同一个证书吗 我在开发阶段使用过它还是我必须购买新的 证书?
- 我在 Urban 上制作了一个用于生产推送通知的应用程序并使用 它的凭据在我的源代码中。够了还是我必须做 城市飞艇的应用程序或我的源代码中有更多变化吗?
- 我尝试了很多方法来找到某种文档或教程来显示 如何将开发推送通知应用程序更改为生产推送 通知应用程序。但不幸的是我找不到任何。你可以吗 给我发送一些教程或文档来说明如何做到这一点?
I am working with my first app for iphone and last part is push notifications. Its my first iphone app and firs time i am dealing with push notifications. In development phase everything is working fine. now i have some questions for productions phase.
- Whats difference between Development push SSL certificate and
production push SSL certificate? Can i use the same certificate
which i used in development phase or do i have to buy a new
certificate? - I made an app on urban for production push notifications and used
its credentials in my source code. Is it enough or do i have to make
more changes at urban airship's app or in my source code? - I tried alot to find some kind of document or tutorial which shows
how to change development push notifications app to production push
notifications app. But unfortunately i couldn't find any. Can you
send me some tutorial or document which shows how to do that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
1- 开发推送 SSL 证书和生产推送 SSL 证书有什么区别?我可以使用在开发阶段使用的相同证书还是必须购买新证书?
答案 - 有两种推送 SSL 证书。开发和生产。仅当您将 iPhone 与 Mac 连接并直接在设备上编译时,开发推送 SSL 证书才会起作用。当您使用 Development Push SSL 证书时,Apple 的演示服务器将用于发送通知。而当您创建应用程序文件或 .ipa 文件并将其安装在设备上时,您需要使用生产推送 SSL 证书。您不能混合搭配这些证书。
2-我在 Urban 上制作了一个用于生产推送通知的应用程序,并在我的源代码中使用了它的凭据。这是否足够,还是我必须在城市飞艇的应用程序或我的源代码中进行更多更改?
答案 - 实际上您只需要从供应门户下载生产推送 SSL 证书,将该证书导出到 .p12 文件中,然后将其上传到 Urbanairship。您无需更改应用程序中的任何代码。
3-我尝试了很多方法来找到某种文档或教程,其中展示了如何将开发推送通知应用程序更改为生产推送通知应用程序。但不幸的是我找不到任何。您能给我发送一些教程或文档来说明如何做到这一点吗?
答案 - 按照本指南操作 - http://urbanairship.com/docs/getting_started_ios_push.html
编辑回答评论 -
不,您不需要购买新证书。您可以从您的开发者帐户创建多个应用程序及其推送 ssl 证书。请参阅此图片 - http://urbanairship.com/docs/_images/apns-certificate.png 。
以下是有关如何创建推送 ssl 证书并将其导出的说明。
1)只需创建一个新应用程序并单击配置链接。
2) 然后点击“启用Apple推送通知服务”。
3) 单击开发或生产配置证书。
4) 按照说明下载推送 ssl 证书。
5)双击它,将其安装到钥匙串访问中。
6)打开钥匙串并找到该证书,右键单击它并选择导出。
7) 选择密码并保存.p12 文件。
8)您需要将此文件上传到urbanairship门户网站上。
注意 - 您永远不需要更改任何代码,也不需要将此证书放入资源文件夹中。该证书需要与您的推送通知一起发送到苹果服务器(哪个城市飞艇正在执行此操作)。
1- Whats difference between Development push SSL certificate and production push SSL certificate? Can i use the same certificate which i used in development phase or do i have to buy a new certificate?
Answer - There are two kind of push SSL certificates. Development and Production. Development push SSL certificate will only work if you attach your iPhone with your mac and directly compile on your device. When you use Development Push SSL certificate Apple's demo server will be used to send notifications. Whereas when you create the app file or .ipa file and install that on device you need to use production push SSL certificate. You can not mix and match these certificate.
2- I made an app on urban for production push notifications and used its credentials in my source code. Is it enough or do i have to make more changes at urban airship's app or in my source code?
Answer - Actually you just need to download production push SSL certificate from provision portal, export this certificate in .p12 file then then upload it to urbanairship. You don't need to change any code in your App.
3- I tried alot to find some kind of document or tutorial which shows how to change development push notifications app to production push notifications app. But unfortunately i couldn't find any. Can you send me some tutorial or document which shows how to do that?
Answer - follow this guide - http://urbanairship.com/docs/getting_started_ios_push.html
Edited to answer comment -
no you dont need to buy a new certificate. you can create multiple apps and their push ssl certificate from your developer account. See this image - http://urbanairship.com/docs/_images/apns-certificate.png .
Here are the instruction on how to create a push ssl certificate and export it.
1) Just create a new app and click on configure link.
2) Then click on "Enable for Apple Push Notification service ".
3) click on development or production configure certificate.
4) follow the instruction and download the push ssl certificate.
5) double click on it to install it in keychain access.
6) open keychain and locate this certificate, right click on it and select export.
7) choose a password and save the .p12 file.
8) you need to upload this file on urbanairship portal.
Note - you never need to change any code or also you dont need to put this certificate in your resource folder. This certificate needs to be send to apple server with your push notification(which urban air ship is doing).