Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Uploading APNS Certificate for Google Service Configuration

Why do I get this message by Production APNS certificate?

"The certificate environment did not match. Ensure that you got the right development or production APNS certificate."

What is exactly 'The certificate environment'? Development APNS certificate makes no problem. I don't get it.

like image 504
pearl7721 Avatar asked Sep 23 '15 05:09

pearl7721


People also ask

How do I update Apple push Notification certificate?

Click Apple Push Certificates portal. In the new tab, sign in to the Apple portal with the Apple ID and password you used when you created the certificate. Next to the certificate you want to renew, click Renew and accept the terms of use.

What is the use of APNs certificate?

To enroll and manage Apple devices in Endpoint Management, you set up an Apple Push Notification service (APNs) certificate from Apple. The certificate enables mobile device management through the Apple Push Network.


2 Answers

Had the same issue!

While exporting from Keychain right click on Certificate itself not on the Private Key inside of it.

like image 84
chemic Avatar answered Oct 24 '22 00:10

chemic


I had the same issue and here's what I did to solve.

The issue was because I generate both Development APNS Certificate and Production APNS Certificate using the same certificate signing request file (the file that you got from Keychain Access > Certificate Assistant > Request a Certificate From a Certificate Authority). Apparently, the certificate signing request file should not be the same.

To solve this problem:

  1. Create a new certificate signing request (Keychain Access > Certificate Assistant > Request a Certificate From a Certificate Authority)
  2. From the Push Notification section of your app, Create Certificate using the .certSigningRequest file you just created
  3. Re-upload the .p12 to GCM

Reference:

  1. http://blog.hypermkt.jp/uploading-certificate-for-google-cloud-messaging-for-ios/
  2. How to generate valid APNS Certificate (.p12) for use in GCM for iOS?
like image 25
yonasstephen Avatar answered Oct 24 '22 02:10

yonasstephen