These days, everyone has an app. If you are one of the people who decided to write a cross platform app using cordova and would like to now post it to the app store, then keep reading and I’ll explain how to go about doing that.
Just a word upfront, in order to build your app, and to post the built app to the app store, you will need an apple machine.
Building your app
There are three steps required to build a release version of your app. Create a certificate, create an app identifier and create a provisioning profile. Once you have done these steps, you will be able to build a signed ipa of your app.
Create a certificate
First, you will need to login to Apple’s developer website. If you do not have an app id, you will need to create one, and you will also need to register as an Apple Developer, which will cost you $99.
Now that you are logged in, go to the distribution certificates page, and create a new certificate by clicking the plus button, marking your certificate as Production > “App Store and Ad Hoc”, and then following through the instructions on the website, which involve creating a signing request.
Create an app identifier
Again, the first step is to login to Apple’s developer website. This time, go to the app identifier page. Fill in a short description, and then specify the app identifier for your app (this is stored in the config.xml in your cordova project:
<widget id="com.softwire.exampleApp" ... >
At this stage, if you want to add any extra services to your app (e.g. PushNotifications) then you will need to mark them on the app identifier.
Create a provisioning profile
As with the other steps, you need to login to Apple’s developer website. Head over to create a new Provision Profile. Select Distribution > “App Store” then continue.
On the next page, you will need to select the App ID that you have just created and click continue.
On the final page, you will need to select the certificate that you have just created and click continue.
Finally, give the provisioning profile a name, and click continue again.
You do not need to download the provisioning profile, we will get XCode to do that for us in the “Submitting your app”.
Submitting your app
In order to submit your app to the app store, you will need to build the signed ipa file, create an app store listing, and then finally submit the app you have built.
Building a signed IPA
Now that you have created a provisioning profile (see above if not), you must get xcode to download it. To do this, login to your Apple account on XCode (Preferences > Accounts), and then click the + button and follow the instructions to add your account.
Once your account has been added, select your account in the left panel, and click “View Details…” in the right panel. On the screen that opens, you should see the provisioning profiles attached to your account. One of these will be the Provisioning Profile you created above. Select the Provisioning Profile and click download. This will now be available to xcode when building your project.
The next step is to inform cordova of which provisioning profile to use when building. This is done using a build.json file. You should create a build.json file, and include in it the id of the provisioning profile that you downloaded.
Finally, you can now run a build on your mac using:
cordova build ios --device --release --buildConfig build.json
This will create a signed ipa of your app under
Creating an app listing
Login to iTunes Connect. From here, you can go to the apps page, and then create a new project. You will now need to fill in details for your app (there are lots to fill in, but the help Apple provides is quite useful), and ensure that you have uploaded screenshots of the app running on both phone and tablet (if relevant).
Once you are happy with the details, save them.
Submitting the IPA to the app store
Now that an app listing has been created, the next step is to upload the build (created above) to Apple.
To perform this upload, you will need Application Loader 3.0. You can download this from the “Prepare for submission” page on the app listing.
Once you have Application Loader installed, login and click choose. Select the ipa that was built earlier, which will upload the app to Apple. It will automatically be linked to your app listing, as the app’s id will match the one specified on the app listing.
After upload, the ipa will be processed by Apple, and following that, can be selected as the version that should be published to the store. If you’re happy with everything, then submit the app to review.
Apple will now review your app, and it will appear in the app store when it is ready. The review process will take a couple of days, and you will receive an email when the submission is complete.