So back in this post I explained how to get started developing iOS apps on a windows machine, using FlashDevelop and AS3.
So I recently had to submit my own game to the App Store and then and only then did I look into the steps to submitting to them. I thought I'd outline them here quickly for anyone else who needs help.
When you are done working on your code, change the build drop down option at the top of FlashDevelop to Release instead of Debug.
Build your project (F8).
At this point, you need to get Distribution p12 and mobileprovision files. On a mac, this is really easy. It's well documented and covered by Apple here, so I won't go into the process myself. For those of us working on a windows machine you need to go through OpenSSL once again. A lot of those details are covered in my previous post so I won't go into it too much. In a nutshell, you need to download and install OpenSSL. When installing it, if you get an error due to some missing C++ redistributables, download them from the list and install that first, then re-run the OpenSSL installer. Install to all default settings.
After you've installed OpenSSL, open a command prompt window enter these commands in order. This will take you into the bin folder in the OpenSSL directory, and from there you will issue commands to generate the files needed. NOTE: if you install the 64 bit version, change "Win32" to "Win64" in number 1 and 2.
- cd C:\OpenSSL-Win32\bin
- set OPENSSL_CONF=c:\OpenSSL-Win32\bin\openssl.cfg
- set RANDFILE=.rnd
- openssl genrsa -out mykey.key 2048 (This generates a key that you will need later on).
- openssl req -new -key mykey.key -out CertificateSigningRequest.certSigningRequest -subj "/emailAddress=yourAddress@example.com, CN=John Doe, C=US" (Change the email address to your own, the CN to your name, and the country ( C ) to your country.)
Don't close the CMD window, but at this point you need to go to your iOS developer portal to upload that certificate signing request (CSR) file to get a distribution certificate. Follow the first step in these Apple instructions to create the certificate. After you create the certificate you need to download it. If it is not available for download immediately, refresh the page and the download button should now be there. Click download and save the file to the bin folder in your OpenSSL directory.
After you've created and downloaded the certificate, you can go back to the provisioning tab in your developer portal and then into the distribution section and finish creating your distribution provisioning profile. Download the file when it is available and put it into your cert folder in your app's directory.
Now go back to your CMD window and enter these commands:
- openssl x509 -in developer_identity.cer -inform DER -out developer_identity.pem -outform PEM (Change the developer_identity.cer filename, to your certificate's filename. This command will create a .pem file called developer_identity.pem, unless you change the name in the command.)
- openssl pkcs12 -export -inkey mykey.key -in developer_identity.pem -out iphone_dev.p12 (This uses the .key file you created earlier and creates your distribution .p12 file)
From there, put the .p12 file in your cert folder, and now that you have your distribution .p12 and provisioning profile in your cert folder, you can package your app as an App Store package (option 9 when you run the PackageApp.bat file in FlashDevelop). This takes a little while depending on the size of your app. When it's done compiling, that's it. You're ready to upload that .ipa file to Apple.
And here is where your Windows adventure ends. At this point, you NEED to use a mac to upload the file. When you get a mac, you can go to your iTunes connect page, and follow the links at the bottom of the page for a guide to how to upload the application.
If you did everything right (providing also that I explained everything right), then you should be all set. Good luck, and if you find any problems please let me know!