Instrumentation and Preparation
Prepare your iOS device
It's recommended to disable the 'Auto-Lock' functionality during your test executions. To do this, open the Settings app, tap the 'Display and Brightness' settings, choose 'Auto-Lock' settings and set 'Auto-Lock' to 'Never'.
Prepare Your iOS Project Before Creating the IPA File
In order to ensure that the instrumentation and deploying will work correctly, it is recommended to do the steps described below.
- Make sure that no Ranorex libs are linked to the project.
Note Ranorex studio cannot instrument iOS applications, which have been already instrumented with Xcode using the Ranorex libs.
- The iOS Deployment target should be correctly set.
Note If the Deployment target doesn't match, between the iOS device and the iOS application, Ranorex Studio will show you an error message that will tell you why the application could not be deployed.
Correctly set the deployment target
- Make sure that the Architecture (armv7 or arm64) match with the iOS device, which will be used for testing.
If you want to test the screen orientation of your iOS app, make sure to build it with the compiler option 'RequireFullscreen' enabled
Note If you build your app without this option, screen rotation features might not work as expected during test automation.
Obtaining the P12 Certificate and the Mobile Provisioning Profile
All iOS applications must be correctly signed with P12 certificate and matching provisioning profile.
Because the instrumentation will make some changes to the application package (IPA file), the application must be signed again.
Note To get help with signing, distribution, P12 and provisioning, please refer to the official Apple documentation.
Adding Your iOS Device
Instrument and Deploy Your iOS Application Package
Apart from instrumenting iOS applications on a Mac using Xcode the recommended way is to instrument iOS application packages (IPA files) with Ranorex Studio on a Windows machine.
Note It's recommended to fresh instrument your app for every new Ranorex release. For further information have a look at the section 'Mobile Testing - Versioning'.
After setting up the iOS device, the app which should be automated has to be instrumented and deployed to the device. The Instrumentation wizard for instrumenting and deploying an IPA file can be started in the endpoint options, the 'Record settings' dialog, or directly by starting the instrumentation wizard as described in the section iOS Instrumentation Wizard.
iOS instrumentation wizard
Before instrumenting any IPA file, the iOS signing must be configured first. To do so, press Settings button in the Instrumentation wizard for iOS. In the iOS instrumentation Settings dialog choose your P12 certificate, type the correct password and choose the mobile provisioning profile. To get the P12 certificate and mobile provisioning profile, please read the chapter Obtaining the P12 Certificate and the Mobile Provisioning Profile.