I am trying to use Java APNS - an open source project - to send push notifications to iPhones. I am getting an error, though.
I have used a .pem file as certificate
Java APNS is expecting the cert as .p12 file.
You have to check both privatekey and certificate in your keychain. then right click-> "export 2 files" and export them you have to give it a password, this password you have to type here
.withCert("gpk.pem", "XXXX")
as your XXXX
good luck
EDIT:
.P12 – PKCS#12, contains certificates an private keys saved with a password
.PEM – is Base64-encoded certificate, lockedby „-----BEGIN CERTIFICATE-----“ and „-----END CERTIFICATE-----“