I am trying to make Push Certificate for Production so I am following the instructions here https://parse.com/tutorials/ios-push-notifications, but in step 2, it says it should have a name of
Apple Production IOS Push Services
As I have changed this for production as it says to do in the note
"Note that you've just enabled Push Notification for your app in development mode. Prior to releasing your application on the App Store, you will need to repeat steps 1 through 7 of this section, but select "Production Push SSL Certificate" in step 2 instead, as covered in Section 7."
But mine comes out as
Apple Push Services
And then in section 2 and 3 when I try to add my .p12 file it says
Why is this happening and how can I set up Push with Parse for Production.
Thanks
It seems that Apple has changed the common name that they are embedding in the production push certificates that they issue. This seems to be related to the deprecation of the older binary push service in favour of the new HTTP/2 service.
A certificate I issued earlier in the year has an common name of "Apple Production IOS Push Services: appname" while a certificate I just created has a common name of "Apple Push Services: appname". Parse seem to have verification code that checks the certificate common name and this code does not accept the new name format.
There is nothing you can do on your side; Parse will need to update their code to accept the new certificate name.
You're creating one of the new "Universal" certificates. Now you don't have separate certificates for Production and Development - just one certificate for both.
These certificates have a different name to the previous format. Perhaps the Parse control panel has not been updated to handle this yet.
https://developer.apple.com/news/?id=12172015b
I'm assuming that you already created "Certificate from a Certificate Authority".
You need to open Keychain Access program. It is located in your Utilities folder in your Applications folder.
After you create your push certificate (the one you download in the developer portal), click it and install it into your keychain.
When you do, it will show up like this:
This is what Parse means in the instructions by it will have the name "Apple Production IOS Push Services"
Next, you will want to right-click your Production push certificate and click "Export Apple Production iOS Push Services":
Then it will take you to this screen to enter a password. DO NOT enter a password. Just click OK:
Then you will be asked to enter your system password. This is the same password that you use to login to your computer when you first turn it on. If you don't know it, then find out because you will need to know it to generate the p12 file.
Then name your P12 file:
This is the file that you will have to upload to Parse for production.
To create development P12, it is exactly the same. In fact, you should create your development p12 first, so you can test it on your development app.
Its because Apple announced a new HTTP/2 based provider API and simplified certificate management process thus changing the way these certificate were named (From Apple Production IOS Push Services to Apple Push Services), and Parse needed to update their system to allow for such certificate to be verified. Thats why you were getting this error. You should try again now, it seems to be working, mine just went through.
Happy Coding!
Related
I am amazed to see that When ever I am creating Certificates "Apple Push Notification service SSL (Production & Development)" it is not shown in Profiles
Things are very much changed on Developer portal And after bashing my head many times (deleting and creating different certificates) its is not working for me
What I am doing:
Attempt 1: When I create certificates from certificate menu it did appear on Profile menu (from where we create provisioning profile & selects certificates) but when I create APNs SSL certificate it never appears in provisioning profile menu
Attempt 2: I created separate SSL certificate and created p12 file from them and uploaded them into FCM server and then i created normal certificate and generated Provisioning profile and installing them in xcode it gives me error of not including something for Notification.
So after trying all these I am now not able to run app on device and not able to work around for FCM notification
Question: What steps are needed to create certificate while working on FCM?
"NOTE: Since all interface and working procedures are updated on developer portal is updated so all help on SO and other places are out date. Please let me know what should I do and how it is done in precise manner it will be great help. THANKS"
I suggest to use for push notification, .p8 key because this same key will work for both sandbox And production mode.
Use this solution to generate .p8 Key And upload key on firebase read this articles
i'm new in the world of certificates, and reading aware i had to adapt my flow to various case posted but without resolve the problem as per my current configuration.
Can you please confirm me the flow to produce the certificate app rightly ?
WHAT WAS DONE
App ID creation
Create an App ID (ex. com.dir.app)
Enable for app ID com.dir.app the push certification
Development APNS creation
[keychain] - produce a pair of key by a Certification request (key pair name: com.dir.app.dev)
[dev.console] - upload certificate SSL for the dev push part inside App ID options
Download the certificate com.dir.app.dev.apns.cer
Open it and export it as com.dir.app.dev.apns.p12
Development certificate creation
Go to Development Certificate tab
Create a new Dev. Certificate providing the previous key produced (com.dir.app.dev)
Download the certificate produced and install inside local machine Keychain. Now the key appear to be certified with the downloaded certificate
Export the certificated as com.dir.app.dev.p12
Provisioning creation
[dev-console] Create a new mobile provisioning for dev (iOS App Development) selecting the appID - Here a problem occurs: apple provide a certificates list without showing ANY details about certificates - instead, for production certificates, an expired date as detail is shown. So i tried to perform various tests.
Export it as com.dir.app.dev.mobileprovision
App Key creation
[dev-console] - Go go the Keys tab
Create a new key
Download the new key as com.dir.app.key.p8
Firebase configuration
Create a new application calling it with the same name of app ID created at point 1 (com.dir.app)
Go to the Cloud messaging tab
Select the application com.dir.app
Insert the new APNS key produced in .p8 format with its ID
Phonegap configuration
Add a new key using as .p12 the file produced at point 10 (com.dir.app.dev.p12), as provisioning file produced at point 12 (com.dir.app.dev.mobileprovision) with respective password.
Assumptions
[Phonegap] - Phonegap build finish correctly and keys are correctly selected
[Backend] - The backend system is currently working with another application (for which iOS configuration are suspects ...)
[Token for Push] - The Token is correctly generate by the backend system
Problem
The push notifications are not received by the app installed on ad iPad with iOS 11.2.2
QUESTIONS
During the configuration of Phonegap, i have to provide the .p12 file for the push notification instead the development p12 certificate exported?
I have another application that inside the App ID tab (in the developer console), doesn't have the Push Notification SSL certificates configured: **how is possible that this application (eg. com.dir.alpha) is able to receive the push notification? Is there maybe another way to enable push?
Many thanks in advance.
Simon
Problem was solved resolving this one Firebase + Push + iOS
Based on your system GCM management, after having being sure to have configured properly your GCM creation and registration, you must have to being sure also to are able to send a push by the Firebase > Notification console selecting "Single Device" as push device target.
It's my first time to update one app in app store after implementing the Firebase push notifications in the project. I'm trying to upload the "Production Certificate" in Firebase Console, but it gives me this:
The APNs certificate provided does not match the current environment
I want to make sure that after updating the app users will receive notifications.
Any link with tutorial to update one app in appstore is welcome.
The mistake I was making was that I was exporting the "private key" part of the certificate in Keychain Access instead of the "certificate" part. As soon as I re exported the .p12 using the correct item - it worked.
Please refer to the answer given here
The other possibility is:
You are confusing the development certificate with Production one in the certificate list of Key Chain Access.
Try to "Export" from the correct one.
This is what brought me here :)
My app is currently being tested by testers via TestFlight. The problem is that they don’t receive any push notifications sent. It’s working on my own device when connecting it to my mac and running the app directly from x-code.
I feel like I’ve tried almost everything, from changing certificate from dev to production to recreating a new production APNS certificate and build using a new profile referencing it, etc.
I know this question has been discussed on other topics but I never found the right answer in my case. I can't post images here because I don't have enough reputation but I have relevant screenshots.
Any help is welcome :)
Elements to help diagnostic :
It’s working on my device when I run the app directly from x-code.
The testers are asked properly if they want to authorize push notifications on their devices (at least the first install, after if they want to get asked again they have to do what’s described in Reset push notification settings for app)
The registering is working because I can see their devices tokens in the logs (but I have the feeling that the token is always the same, no matter if the app is built with the production or the dev certificate, not sure if it’s normal).
I have an APNS Production certificate.
I have a distribution profile, with “push notification” enabled. It’s linked with my “full” appID (and not the generic one with “*”).
I’m signin the build in release mode with the distribution certificate (not in debug mode), and I’m using the provisionning profile described above (the distribution one, linked with my app id)
And when I check in the "binary & entitlements" window just before submitting the build I see the the provisionning profile is correct and that "aps-environment" is set to "production".
Server-side : The APNS call is made by using javapns (https://code.google.com/p/javapns/) from a google app engine server. Like I said the notification are correctly received on my own device so I guess this call is working. We have a .p12 file generated from the APNS developpement certificate and a .p12 file from the APNS production certificate, and I've tried to make the call with both and it's not working. The server-side code hasn't change from the previous version and it was working in production with the app on the store. The problem is really focused on testing with testflight.
Thank you all !
If you followed Ray Wenderlich's tutorial and you made everything work in development mode, the issue most likely comes the fact that you now need to create a new .pem-file for production mode.
So, you need to perform exactly the same steps that you did with the development certificate (i.e. the .p12-file) you downloaded once more with the production certificate which you can obtain in the iOS dev center as well:
Currently, I have one app publishes in the appStore and I don't know exactly why the push notifications are not working. Something is wrong with the .p12 file in my server because when my server try to generate a push and send it to Apple Environment, I can see next error in my log:
02-27 11:42:11,868 [IOSPushNotificationSender] ERROR javapns.notification.PushNotificationManager - Delivery error: javapns.communication.exceptions.InvalidCertificateChainException: Invalid certificate chain (Received fatal alert: certificate_unknown)! Verify that the keystore you provided was produced according to specs...
2013-02-27 11:42:11,874 [IOSPushNotificationSender] ERROR camMan.server.mobile.ApplePNSSender - javapns.communication.exceptions.InvalidCertificateChainException: Invalid certificate chain (Received fatal alert: certificate_unknown)! Verify that the keystore you provided was produced according to specs...
Ok, I've tried to generate a new .p12 file but I don't remember exactly which one was the original certificate (.cer).
I've tried to download the (.cer) from the provisioning profile but when I open it with keychain access, this certificate hasn't got any private key.
So, I am lost, I don't know what can I do...Can I generate a new .p12 file without to have to modify any certification or whatever in my app? I don't want to upload a new version of my app in appStore...only I need to know how generate or download or whatever to set a new and valid .p12 file and send again push notifications.
Also I've checked all the settings in provisioning portal and everything is Enabled,Active like others apps that I have...so I think the only problem is the .p12
Also I still have the same key/paswoord of the p.12...only I've lost the CSR (.cer).
It sounds like the private key is missing on your machine - either it was deleted, or it belongs to another Mac.
In either case, you can simply revoke the existing vert and create a new one by uploading a new CSR (created by the Keychain Access app on your Mac).
Without a private key, your certificates and provisioning files are worthless. Revoke them all, delete them all, and regenerate new certificates and provisions after carefully re-reading Apple's documentation on the topic. You must modify the Build settings in your Xcode projects to use the new ones if it doesn't do this automatically. This won't affect apps already approved and in the App Store.
Since you had push notifications working during development phase are probably familiar with the procedure of installing certificate to your server.
You can create and install a new certificate whenever you want if you lost your old files.
Two things you have to keep your eye on:
development phase:
you are using Development Push SSL Certificate
your target server is: gateway.sandbox.push.apple.com
production phase:
you are using Production Push SSL Certificate
your target server is: gateway.push.apple.com