Publishing your App to Google Play & Apple Apps Store
Posted: 12 Jul 2016, 23:39pm - Tuesday

Now, I have completed my app, well tested and working good. So my experience and how I did it. Google Play Note: I assume you have subscribe Google Developer Console and paid the necessary payments. First you need to generate/create your app key or certificate by using java keytool. In windows, you need to add the java bin path on  Windows environments path, see below: win_env So once you have configure this, go to you App working directory and cast the command:

$ keytool -genkey -v -keystore [APP_NAME].keystore -alias [APP_NAME_ALIAS] -keyalg RSA -keysize 2048 -validity 10000
Now that you have the key, then compile your APK with the key (most commonly called as keystore)... Note: you must be in your App working directory.
$ cordova build android --release -- --keystore="[FULL_PATH_OF_YOUR_KEYSTORE]" --storePassword=[KEYSTORE_PASSWORD] --alias=[APP_NAME_ALIAS]
That's it, then you need to go to platforms/android/build/outputs/apk/ and look for android-release.apk and upload it on Google Developer Console. Easy enough!   Apple App Store To be honest, apple is more daunting process. Ok, here it comes. First of all, you need to complete the following in Apple Developers:
  1. Register to Apple Developers at developers.apple.com
  2. Purchase Apple Developer Program for NZD 150.00
  3. Assign or invite admin and developers in your account (developers profile)
  4. Create iOS certificates for iOS Development and iOS Distribution
  5. Then create identifiers (App ID)
  6. After creating the developers profile, certificates and identifiers you may now export this to bind it to your app.
  7. In Xcode, go to Preferences then select Accounts and select your apple ID
  8. At the bottom of the dialog, click the cog icon and click Export Developer Accounts then save this file as .developerprofile  at platforms/ios/ folder of your app project
Note: You cannot test your app to real device without the above mentioned. So if you have it all setup, you can now test run your app to your real device for testing and then publish it. To test it on real device, plugin your iPhone/iPad to you iMac or Mac machine then on Xcode you should see your device. Screen Shot 2016-07-13 at 1.11.37 PM copy Just select the device and click Play button to test your app to your real device. Easy! Now let's proceed on publishing the app, we have two steps here. Create the app profile in Apple iTunes Connect and compile/build the app... Apple iTunes Connect
  1. login to itunesconnect.apple.com using your developer's apple ID
  2. go to My Apps
  3. create new AppScreen Shot 2016-07-13 at 1.49.59 PM
  4. just tick iOS and fill up the form. In SKU field, you can fill up anything, something unique. It would be good name like if you app name is TestApp and the version is 1.0.0 then you can put SKU field as TestApp1.0.0
  5. Then click Create and will bring you to more fields to fill up. Just complete the mandatory fields.
Compile/Build the App
  1. In your app working directory, cast the command cordova build ios
  2. Open Xcode, open your App project then go to Product and select Clean
  3. Make sure you have select an iOS device in the build dropdown
  4. Then go to Product and select Archive
  5. After archiving, a dialog will popup Screen Shot 2016-07-13 at 1.29.31 PM
  6. You can click "Upload to App Store" to upload your app
  7. Click export then select the appropriate option for you appScreen Shot 2016-07-13 at 1.30.02 PM
  8. Just follow the steps and it will do it for you
  9. Once done, go to itunesconnect.apple.com then click the App you want to publish then select the app that you just uploaded via Xcode Archive.
Important Reminders:
  1. All App Bundle ID should be the SAME on the following:
    • Xcode > Project Property > General > Bundle Identifier
    • Apple Developers > Identifiers > App ID entry
    • Apple iTunes Connect > My Apps > App entry
  2. Make sure the app bundle identifier is unique
  3. Every release, don't forget to update your build and version
I think that's it! Good luck...   Conclusion: I found Android as the easier way to publish app. Less hassle, not so strict and really simple.