开发者

Some questions about push notificatons?

开发者 https://www.devze.com 2023-02-22 05:55 出处:网络
I am working w开发者_运维技巧ith 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 everythin

I am working w开发者_运维技巧ith 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.

  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?
  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?
  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?


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).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号