views:

723

answers:

1

Hi all,

how to create a .pem file to be stored in the hosting server for APN payload data ?

thanks

+3  A: 

Here is what I did, From: MacOSCoders, blog.boxedice.com and "iPhone Advanced Projects" chapter 10 byJoe Pezzillo.

With the aps_developer_identity.cer in the keychain:

Launch Keychain Assistant from your local Mac and from the login keychain, filter by the Certificates category. You will see an expandable option called “Apple Development Push Services”

Right click on “Apple Development Push Services” > Export “Apple Development Push Services ID123″. Save this as apns-dev-cert.p12 file somewhere you can access it. There is no need to enter a password.

The next command generates the cert in Mac’s Terminal for PEM format (Privacy Enhanced Mail Security Certificate)

openssl pkcs12 -in apns-dev-cert.p12 -out apns-dev-cert.pem -nodes -clcerts

On the server set the file permission of this unencrypted key by using chmod 400.

zaph
I have followed the above steps and now its working.I have kept the certificate and the php script on my local web server (Xampp).I am able to get the device token , and i am using it in the php script. The php script is able to connect and send payload data. But still then i am not able to get the PUSH Notification.What is the problem ? Does the notifications take time to reach ???
Biranchi