For creation of .pem file you need to follow the below simple steps.
Here you go.
Step 1 : Login to your Developer account go to Provisioning Portal, click "Certificates". Then, click '+' button.
Step 2 : Select Apple Push Notification service SSL (Production) option under Distribution section, then click "Continue".
Step 3 : Select the App ID you want to use for your BYO app (How to Create An App ID), then click "Continue" to go to next step.
Step 4 : Follow the steps "About Creating a Certificate Signing Request (CSR)" for create a Certificate Signing Request.
Step 5 : Upload the ".CSR" file which is generated in Step 4, then click "Generate".
Step 6 : Click "Done" to finish the registration, the iOS Provisioning Portal Page will be change the UI.
Step 7 : Now go to "Keychain", look for the certificate you have just installed. If unsure which certificate is the correct one, it should start with "Apple Production IOS Push Services:" followed by your app's bundle ID.
Step 8 : Expand the certificate, you should see the private key with either your name or your company name. Select both items by using the "Select" key on your keyboard, right click (or cmd-click if you use a single button mouse), choose "Export 2 items".
Then save the p12 file with name "yourselectedname.p12" to your Desktop - now you will be prompted to enter a password to protect it, you can either click Enter to skip the password or enter a password you desire.
Step 9 : Now open "Terminal" on your Mac, and run the following commands:
cd
cd Desktop
openssl pkcs12 -in pushcert.p12 -out pushcert.pem -nodes -clcerts
** DONE you have successfully created an Apple Push Notification Certificate (.pem file)!**