A p12 file is basically a digital certificate which uses PKCS#12 (Public Key Cryptography Standard #12) encryption. In order to build the app, you will need to generate a p12 file from your machine.
Launch Keychain Access located in /Applications/Utilities.
Choose Keychain Access > Certificate Assistant > Request a Certificate from a Certificate Authority.
In the Certificate Assistant dialog, enter an email address (The e-mail address without 2-factor authentication) in the User Email Address field.
In the Common Name field, enter a name for the key (for example, StackIdeas Dev Key).
Leave the CA Email Address field empty.
Choose “Save to disk”, and click Continue.
Choose the destination to be saved and keep the generated .certSigningRequest file for the next step.
Head over to certificate management in order to create a new certificate:
Click on create new button.
On the next step, choose
iOS Distribution (App Store and Ad Hoc)and click continue.
On this step, choose the CSR file that was created previously and upload it here.
Once everything is done, download the certificate file with the download button.
Double click on the downloaded certificate in order to install the certificate to your mac.
Open Keychain Access Manager app in your mac.
My Certificatescategory, search for the installed certificate previously.
Right click on the certificate and choose
Save the certificate with
Key in the new password when it prompted to do so. Please remember or store the password somewhere safe since it will be use when building the app later on.
You should now have the exported .p12 file.