Publishing to app store
Submitting an App to the iOS App store requires a few things:
- A Paid Apple Developers account
- A valid provisioning profile
- App Development and Distribution certificates
To enroll in the Apple Developer Program, follow the instructions listed here
Generating a release build
If the iOS platform is not already added, be sure to add it:
ionic cordova platform add ios
With the platform added, run the build command with the
ionic cordova build ios --prod
This will generate the minified code for the web portion of an app and copy it over the iOS code base.
From here, open the
.xcworkspace file in
./platforms/ios/ to start XCode.
Generating Signing Certs
Generating certificates for iOS is a bit of an involved process, so be sure to check Apple's official documentation on what certificates are and how to generate them.
To create the certificates and profiles needed, visit Apple's member center and follow the links described in Apple's documentation.
There are two types of certificates that matter here, Development, and Distribution. Development Certificates are just that, meant for development time. They are meant to sign an app and deploy it to devices that the certificate has access to.
Distribution certs are meant for distributing an app to the store. When an app is signed with a Distribution cert, it can be installed on any device.
Signing the App in XCode.
After generating to correct certificates, there are options to either have XCode automatically manage certificates or manually mange them. It's suggested to let XCode automatically manage certificates. This will make sure that the correct Development and Distribution certs are used, based on the build type selected.
With this option selected, select
Archive from the
Product > Archive menu. This will build a version of the app that is ready for distribution in the app stores. After archive has been created, Xcode Organizer is opened.
Xcode Organizer displays a list with builds of the current app. Pick the last build and click 'Upload to App Store'. There should be a place to select the team followed by some more information on the app and a "Upload" button to click.
If the upload successfully, the app should be listed on Itunes Connect and listed in 'Activities'. From there, TestFlight can be enabled for beta testing, or the App can be sent for approval from Apple.
Updating an app
As an app grows, it will need to be updated with new features and fixes. An app can be updated by either submitting a new version to Apple, or by using a live update service like Ionic Deploy.
With Ionic Deploy, app changes can be pushed in realtime directly to users from the Ionic Pro dashboard, without waiting for App Store approvals.
In order for the iOS App Store to accept the updated build, the config.xml file will need to be edited to increment the version value, then rebuild the app for release following the same instructions above.