0

I am trying to send push notifications using APNS. I have different set of apps generated using different provisioning profiles (for different Apple account). For example: I have app ABC developed using Apple Profile X, and APNS code using provider certificate of same Profile X. When I send Push Notifications using this certificate, they are delivered properly to the Apps.

But when I use a Provider Certificate generated using Apple Profile Y, it does not deliver the message to Apps developed using profile X.

I want to know, if I want to send notifications to any app which is registered in my server for push notifications, what kind of provider certificate should I use?

Is there any general purpose provider certificate which can send messages to any app?

I am getting the following exception when I test in cross certificate scenario:

Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown
       at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:174)
       at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:136)
       at com.sun.net.ssl.internal.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:1586)
       at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:865)
       at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1029)
       at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:677)
       at com.sun.net.ssl.internal.ssl.AppInputStream.read(AppInputStream.java:75)
       at 

I am sure the certificate I am using is correct, since it works for Apps of same profile.

Please ask for more clarification if required.

Eran
  • 387,369
  • 54
  • 702
  • 768
RickDavis
  • 2,276
  • 6
  • 25
  • 31

1 Answers1

0

You can't use one certificate to send APNS to multiple applications. You can't use the certificate generated for one app to send APNS to another app. Each certificate it tied to a single application and can only be used to send push notifications to that application. In addition to that, you can generate for each app one certificate for the sandbox environment and one for the production environment. You can't use the sandbox certificate to send APNS to an app built with the production certificate or the other way around.

Eran
  • 387,369
  • 54
  • 702
  • 768