In this chapter, you’ll learn how to instrument an iOS app.
For iOS developers: As part of the instrumentation process, the app will be compiled with the Ranorex automation library. This library adds additional functions and permissions to your IPA.
Do NOT publish instrumented apps to the App Store.
Instrumented apps do not work with TestFlight.
In this chapter
Before you can instrument and deploy an app for automation with Ranorex Studio, complete the following preparations:
Prepare the app
To instrument an iOS app, you will need the IPA file, the associated P12 certificate and password, and the proper mobile provisioning profile.
Make sure you can access the IPA, P12 and mobile provisioning profile files from the computer on which Ranorex Studio is installed. We that recommend you store a copy of them in a folder on that computer.
Prepare the mobile device
You can instrument and then immediately deploy the app to your mobile device with the Instrumentation Wizard. If you want to do so, you must connect the mobile device to your computer via USB (recommended).
For our example, we’ll instrument the KeyPass app. The KeyPass app is available under the GNU General Publice License. For information regarding the copyright holder and the license agreement, go to https://keepass.info/help/v1/license.html.
In preparation for the instrumentation process, we’ve stored the IPA, the P12 certificate and the mobile provisioning profile in the folder iOS app testing on the computer Ranorex Studio is installed on.
Start the Instrumentation Wizard and confirm the Windows security dialog.
Specify IPA and settings
Do not change the default setting Instrument & deploy custom IPA. This will instrument and deploy the app to the mobile device. Click Next >.
Click Browse… and browse to the folder that contains the IPA.
Specify the correct P12 file.
Enter the password for the P12 file.
Specify the correct mobile provisioning profile.
Default settings for instrumenting the app.
Default settings for deploying the app after instrumentation.
Select mobile device
Finally, select a mobile device from the list of available devices.
Start instrumentation and deployment
Click Next > to start the instrumentation process.
Watch it progress. It can take several minutes.
The app has been instrumented successfully.
If the process fails, please first check you’ve applied the ⇢ device settings correctly and
⇢ connected the device properly. A common problem is also that another program is consuming too many resources, slowing down instrumentation to the point of a timeout error. Either close all other programs or increase the Instrumentation timeout in the settings.
If the app has been instrumented and deployed correctly, you will see the following on your device:
The instrumented app appears in the Ranorex Service App.
The instrumented app appears on your device’s home screen.
After instrumenting and deploying the iOS app for the first time, start the app manually once! Otherwise it will not be visible within the Ranorex Service App.
In Ranorex Studio, you can see the app has been instrumented correctly if it appears for selection when creating a mobile test.