Now that you have downloaded your development certificate from the Provisioning Portal, the final step is to convert it to a P12 certificate file.
Flash Professional will use this P12 file to digitally sign any iOS apps you create.
The process for generating a P12 certificate file differs depending on your choice of operating system.
The steps for Mac OS X are covered here. If you are using Microsoft Windows, then refer to the Creating a P12 certificate using Windows recipe.
You will need the development certificate that you created and downloaded from the iOS Provisioning Portal. If you haven't already done this, then follow the steps outlined in the Obtaining your development certificate recipe.
Execute the following steps:
Launch the Keychain Access application from the
Applications/Utilities
folder.Select File | Import Items (Shift + Cmd + I) from the drop-down menu. From the file browser, select your certificate from
Desktop/developer_identity.cer
.Your certificate will be installed in the Keychain Access application. You can confirm this by clicking on the Certificates category where you will see your iPhone Developer certificate listed.
Now, select the Keys category and find the private key associated with your certificate. Both your public and private keys will be listed and named using the name you entered when creating your CSR. This is shown in the following screenshot:
Context-click on the private key and select Export. A dialog box will appear asking you to specify where to save the P12 file when it is created. Choose the desktop and click on Save.
Keychain Access will ask you to specify an export password. Flash Professional will prompt you for this password while compiling your
.swf
files into native iOS apps, so choose something you aren't likely to forget. Enter your password and confirm it by re-entering it into the Verify field and then click on OK.Note
You may also be prompted by Keychain Access to enter your Mac's login password. If so, do this and click on Allow to grant Keychain Access permission to export the key.
If successful, a P12 certificate file will be created and saved to your desktop.
It is important you keep this file safe as you will need it to publish any of the examples in this book.
Using Finder, navigate to your
Documents
folder and create the following folder structure within it:packt/flash-ios-cookbook/developer-files/
.Copy your P12 file to this new location. We will keep it here from now on.
When publishing iOS apps from Flash Professional, you will be prompted for your P12 certificate file and password. Both are used to digitally sign your app allowing it to be deployed and tested on an iOS device.
The P12 certificate is the first of two files that will be used by Flash Professional every time you make an iOS build.
Finally, a few additional words regarding certificate expiration.
When your developer certificate eventually expires you will need to request a new one from the Provisioning Portal before converting it to a P12 file. Any apps that were published using the old certificate will no longer run on your iOS device and will need to be republished using a new valid P12 file.
If you accidentally delete your existing P12 file, then you can simply recreate it from the steps outlined in this recipe. There is no need to request a new development certificate from the Provisioning Portal.