Testing an app is always an important step to take before releasing, but it can often hard to do. While Android allows users to just load arbitrary apps on their device, iOS is a much more closed ecosystem with their own rules. In order to send an app out for user testing, you have to use TestFlight. Apple’s TestFlight is a service for sharing early release of an app with user. From TestFlight’s site:
TestFlight makes it easy to invite users to test your apps and collect valuable feedback before you release them on the App Store. You can invite up to 10,000 testers using just their email address.
So with TestFlight, we can take an early build of an app, and share it with a select group of users, and allow them to provide feedback on their experience. Since the app is compiled ahead of time, developers can test the full spectrum of native APIs and detect if there are any errors.
Since the app is installed on the testers device, it’s also able to utilize Ionic Pro Deploy and ship updates during the trial period! Let’s dive into what we need to do in order to use Ionic Pro with TestFlight.
When TestFlight is used in combination with Ionic Pro Deploy code updates can be delivered to the testers throughout the 90-day testing cycle.
By doing this, our development cycle can be boiled down to:
- Creating an initial native build of the app.
- Uploading the app to the App Store for use with TestFlight.
A new build will only need to be uploaded to the App Store if native layer changes are made or if the testing time frame expires.
One of the first things you will need to have a Distribution Provisioning Profile associated with your app’s bundle ID. That Provisioning Profile will need to be associated with a valid Production Certificate that you have access to use. Before continuing, please make sure you have all of that properly configured and that your Apple Developer user has the required roles in order to perform the required operations.
With the provisioning profiles and certificates taken care of, we’ll next want to create an app and link it with our Ionic Pro account.
ionic start my-app tabs
If you need some more info on getting started with Pro, take a look at our Getting Started guide
After starting an app, we’ll want to then add the Deploy Plugin.
The Pro Dashboard should also be able to provide you with the exact install command needed when getting setup.
Next, we’ll add the iOS platform
ionic cordova platform add ios
One thing to make sure is that the widget/id in the
config.xml is updated to match the App’s bundle ID used with Apple’s certificates. After adding iOS is added, we’ll build the app:
ionic cordova build ios
Then open the project in Xcode
From here, you’ll want to follow Apple’s steps for Distributing an app using TestFlight. Note that in some cases the Ionic and Cordova build processes have already performed certain actions such as setting the
Bundle ID based on data in your
config.xml file. Key points in the steps are:
- Signing: If automatic signing cannot be used, manually sign the app using a valid Production Certificate and an associated Distribution Provisioning Profile.
Generic iOS Devicein the Scheme toolbar menu on the main window of Xcode.
Project>Archivefrom the Xcode menu, this should open the archive window.
- Add the app in iTunes Connect.
- From the Xcode Archive window, validate the archive.
- Press the
Upload to AppStore…button.
Once the upload completes, open the app in iTunes connect to add internal and external testers and fill out the information for beta-test review.
Testing the App and Deploying Changes
At this point, internal testers should be able to download your application via TestFlight. External users must wait until Apple approves the app for beta-testing.
Changes to the Ionic application can now be pushed to Ionic Pro and distributed to testers using Ionic Pro’s deploy feature by pushing the code to Ionic Pro and deploying the resulting build to the channel that is being used by the test app.
TestFlight is a power service that can help get your app distributed to your testers easily. If you would like more in-depth help with the full development cycle of your application including user testing, please contact our Enterprise Customer Success team. Our experts can provide hands-on and highly customized training and advisory services to get you started and keep your project on track.
Learn more by visiting our Ionic for Enterprise page.