This tutorial is a step-by-step instruction on how to generate a Distribution Certificate (.CER) file on Apple provisioning portal in order to build and submit your application from your account. You need a Mac to do this.
NOTE: You must be enrolled into Apple iOS program at https://developer.apple.com/programs/enroll/
1. Login using your dev account credentials on https://developer.apple.com and click “Account” at the top.
2. Click "Certificates, Identifiers & Profiles”.
3. On left side menu below "Certificates" click on “All”.
4. On the right side of “iOS Certificates” click on “+” button to add a new certificate.
5. From “Production” options select “App Store and Ad Hoc” and click on "Continue" button.
6. Click on "Continue" again. If you created your CSR file earlier, then there's no need to create another one or generate your own by following this tutorial.
7. Click on "Choose File" and select the CSR file you created and then click on "Generate."
8. Click on the "Download" button to download a .cer file to your machine and then click "Done."
9. Double-click the .cer file to install it in Keychain Access. It will have the name "iPhone Distribution <firstname> <lastname>" and will expire one year from today's date. Done.