I'm trying to configure a connected app to send push notifications, following the instructions in Salesforce Mobile Push Notifications Implementation Guide.
From the docs:
In the iOS Developer Member Center, create an ID for your app, then use the CSR file to generate a certificate. Next, use OpenSSL to combine this certificate with the private key file to create an appkey.p12 file. You’ll need this file later to configure your connected app.
There are no instructions on using OpenSSL, only a reference to this tutorial which is not Salesforce specific. I've tried to follow the directions in that tutorial, but when I try to upload the cert file, I get the error "The Apple push certificate or password is invalid."
First off, the quote above says you must combine the certificate from apple (aps_development.cer
) with your private key file to create a .p12
file. There are a couple of things wrong here:
- When you export your private key, that generates a
.p12
file. - The instructions in the linked tutorial have you use
openssl
to convert the.p12
file to a.pem
file, and to convert your certificate to a.pem
file. You then concatenate the two files into a single.pem
file.
I assume this is what the salesforce docs mean by, "use OpenSSL to combine this certificate with the private key file, " however, it says that you'll create a .p12
file. I'm guessing this is in error?
The tutorial includes instructions for connecting to Apple's sandbox push server using your cert & key .pem
files, and this worked for me, so at a minimum I know I've got good .pem
files. I just can't upload the cert to salesforce. I've tried uploading each of the following:
- original exported private key
.p12
file - original
aps_development.cer
file from apple - converted private key
.pem
file - converted certificate
.pem
file - concatenated
.pem
file
Salesforce will not accept any of these. Finally - several of these steps involve the use of a passphrase. I generated a passphrase at the beginning of the process, pasted it into an editor, and copy-pasted it at each step to ensure I didn't have passphrase issues. This is the same way I'm filling in the 'certificate password' field in Salesforce, so I feel pretty certain that this isn't a password problem.
Has anyone gotten this to work, using Apple APNS with a Development certificate?