Support APNS using VOIP certificates over old push certificates?

Hello guys,


I have app which is already live on store. And i have use Push Notificate using APNs certificate. (In backend i have .pem file of APNs certificate)

Now, i want to update new version of app and i have implement VOIP push notification. (In backend i have new .pem file of VOIP certificate)


To send push i have replace APNs certificate with VOIP certificate for new version in backend.

But in old versions apps its stopped receiving Push Notification b'cas i have replace .pem file with new voip.pem file.


Is there any way to keep working push for older version app also ?


Thanks in advance

There are two ways to approach this problem, and the best approach depends on which version of the APNs API you're using.


First, some background: in December 2015, Apple released a new, HTTP/2-based APNs API. Among other things, the HTTP/2-based API allows providers to use multi-topic certificates and specify a topic when sending notifications. If you're using the HTTP/2-based API, you can generate a multi-topic certificate (the kind the works in both the development and production APNs environments) and use a single connection to send notifications to both your main app's topic and your app's VOIP topic.


If you're not using the HTTP/2-based API, your options are more limited. You can still use a multi-topic certificate, but can't specify the topic to which you'd like to send a notification, so the main app topic will always be used by default. That means that you'll need two single-topic certificates and will need to maintain two parallel connections to send notifications to two different topics.

Thanks for replying.

Basically i am using Ejabberd server as a backend. So, let me confirm that it support HTTP/2-based API for APNS.

Our application is already registred for APNS, since we are going to implement PushKit we have created VOIP certificate too, Is it really necessary?

Can't we just use the APNS certificate for VOIP push?


Since there are two certificates now i have two tokens one is used to send normal push, another one to send VOIP push, can't we simply use one token/ certificate for both purpose ?


Thanks.

No.


For PushKit you need separate device token other than device token for standard notifications.


Please note - you can generate same certificate for both Voip as well as standard notifications as part of multi topic certificate if your app supports both voip & standard notifications But still you will have separate device tokens for Voip & standard notifications.


That means there can be one multi topic certificate in your case, but device tokens will be separate.


Regards,

_Ayush

Hi, I think I understand what you are saying regarding the multi-topic HTTP/2 certificate, can you verify if I got it right?


If the bundle ID of our app is "com.foo.bar" then:


1) To send a voip push we use the "apns-topic" of "com.foo.bar.voip" and the token is from PushKit framework for the VoiP push type.


2) To send an 'old style' push (non VoIP related; alert, badge, sound" we use the the "apns-topic" of "com.foo.bar" and the token received from delegate call back form [[UIApplication sharedApplication] registerForRemoteNotifications]?


Thank you.

Yes, that's right !

Support APNS using VOIP certificates over old push certificates?
 
 
Q