33

I'm trying to create a certificate for Production iOS Push Services. Instead I get an Apple Push Services. How can I create a dedicated Apple Production iOS Push Services certificate?

The top certificate is what I used to get. The bottom one is what I now get.

enter image description here

I use Pusher application to test my push notifications certificate and it cannot read the p12 of the new Apple Push Services.

Richard Slater
  • 6,313
  • 4
  • 53
  • 81
YogevSitton
  • 10,068
  • 11
  • 62
  • 95

4 Answers4

42

Apple have changed the name of the certificate that is issued. You can now use the same certificate for both development and production. While you can still request a development only certificate you can no longer request a production only certificate.

Since the purpose of the certificate is no longer production only Apple has changed the common name to Apple Push Services. The functionality of the certificate is not affected.

Unfortunately services that validate the CN of the certificate may reject this new name. There is nothing you can do about this until the service updates its verification code. For example, Parse.com had this issue a few days ago but their verification code has now been updated and they will now accept the new certificate name.

Paulw11
  • 108,386
  • 14
  • 159
  • 186
  • Same problem for me, All of my previous certificates are working, But with new certificates I'm getting error like "You have selected the Production server, yet your Certificate does not appear to be the Production certificate! Please check to ensure you have the correct certificate!" (Server team is using Pushsharp to send notification).. – siva krishna Dec 23 '15 at 09:22
  • 1
    what's "CN"? sorry maybe I have lost some knowledge. – Blues Zhou Dec 30 '15 at 09:54
  • The common name that is embedded in the certificate. – Paulw11 Dec 30 '15 at 10:13
  • @sivakrishna, have you find a solution for PushSharp? – Hemang Jan 04 '16 at 08:07
  • @Hemang No, my service team is unable to edit/change any thing on those classes, for your reference https://github.com/Redth/PushSharp/pull/586 – siva krishna Jan 04 '16 at 10:02
  • @sivakrishna, alright, thanks! Yes, I have seen your comments on that thread as well. – Hemang Jan 04 '16 at 10:13
  • @Hemang It seems they have to change the files..., let me know if you find any solution... – siva krishna Jan 04 '16 at 10:15
  • @sivakrishna, no, not yet. I'm looking for a solution from last year :D – Hemang Jan 04 '16 at 10:16
  • And it is called `Apple Push Notification service SSL (Sandbox & Production)` – onmyway133 Apr 04 '17 at 14:06
  • Then I could delete the certificate type `APNs Development iOS` or is it still required? – andreszs Sep 04 '17 at 13:06
9

Apple Change Apple Production IOS Push Services cert name to Apple Push Services if you used pushsharp , you need go to github https://github.com/v-tsymbalistyi/PushSharp download zip and used visual studio recombile because the code change if (production && !subjectName.Contains("Apple Production IOS Push Services") && !subjectName.Contains("Apple Push Services")) throw new ArgumentException("You have selected the Production server, yet your Certificate does not appear to be the Production certificate! Please check to ensure you have the correct certificate!");

            if (!production && !subjectName.Contains("Apple Development IOS Push Services") && !subjectName.Contains("Pass Type ID"))
                    throw new ArgumentException("You have selected the Development/Sandbox (Not production) server, yet your Certificate does not appear to be the Development/Sandbox certificate!  Please check to ensure you have the correct certificate!");            

and you just copy PushSharp.Apple.dll to server then everything OK

吳肇祐
  • 91
  • 1
  • 2
    Additionally, try the 3.0 series of PushSharp where this is fixed and generally works better anyway :) – Redth Jan 11 '16 at 13:24
  • Do we need to remove line which throws exception? – subha Feb 12 '16 at 15:30
  • @Redth, 3.0 is still in beta, Also getting error as "Unable to find version '3.0.0-beta29' of package 'PushSharp'." while trying to install – subha Feb 12 '16 at 15:30
  • @Redth can you please check that: http://stackoverflow.com/questions/35602663/pushsharp-2-fires-an-exception-while-sending-notification-to-apple-ios – Marzouk Feb 24 '16 at 16:46
4
  1. Login Apple Developer Account.
  2. In Member Center -> click Certificates, Identifiers & Profiles
  3. Choose IOS apps
  4. In Certificates -> click add new(+)
  5. There you can see Apple Push Notification service SSL (Sandbox) [for development] and Apple Push Notification service SSL (Sandbox & Production)
  6. To click on continue , choose Appid(bundle id)
  7. Need to continue. This have the demo to generate csr
  8. Add CSR file
  9. Then it generate APNs. Put the name for it.

Note: You can generate APNS for Development through Apple Push Notification service SSL and Production for Apple Push Notification service SSL (Sandbox & Production).

jscs
  • 63,694
  • 13
  • 151
  • 195
S. Karthik
  • 618
  • 5
  • 16
  • 4
    When I generate Apple Push Notification service SSL (Sandbox & Production) then Apple Push Services is created instead of Apple Production iOS Push Services – YogevSitton Dec 23 '15 at 08:49
  • Can you send the screen shot of it. I think both are same . you don't worry of it. That is production APNS. i will attach the screenshot of mine. – S. Karthik Dec 23 '15 at 08:51
  • Yes - I see something else. Added a screenshot to my question. – YogevSitton Dec 23 '15 at 08:55
1

Then click on you App Id in developer account App ID -> Edit -> you will get development and production ssl certificate mode.

Then upload your CSR file=> download aps_production.cer

Then use This link to create PEM file (Which used on server)

There is one simplepush.php file you can test from your mac cmd.

Hope this will help.

Avijit Nagare
  • 8,482
  • 7
  • 39
  • 68
  • When I generate Apple Push Notification service SSL (Sandbox & Production) then Apple Push Services is created instead of Apple Production iOS Push Services – YogevSitton Dec 23 '15 at 08:49
  • Yes you are doing right. Now right click on Apple Production iOS Push Services export you will get private key as a p12 file. use this for create certificate refer tutorial – Avijit Nagare Dec 23 '15 at 08:58
  • 1
    I use Pusher application to test my push notifications certificate and it cannot read the p12 of the new Apple Push Services. I uses only the p12. – YogevSitton Dec 23 '15 at 09:01