Welcome to the Ranorex Support Portal

iOS source-code instrumentation

In this chapter, we’ll show you how to instrument your app using source code on iOS. Simply follow the instructions below. Alternatively, there are also many video tutorials on YouTube that detail this process.

  1. Download the automation lib from the Mobile Download Archive on your Mac.

  1. Open the XCode project of your application under test.

  1. To avoid shipping an instrumented app to your customers it is recommended to create a separate target for your app under test. You should select the project file and duplicate the existing target.

  1. Rename the newly created target.

  1. Add the previously downloaded automation lib to your newly created target.

Choose the lib file and specify the target, i.e. where the lib will be added
  1. After doing this, the automation lib will be listed in the ‘Linked Binary With Libraries’ list in the ‘Build Phases’ pane of the test target.

  1. Add the CFNetwork framework to the list.

Add CFNetwork.framework
Added automation lib and network framework
  1. In the Build Settings pane of the test, add the switches ‘-ObjC -all_load’ to the option Other Linker Flags.

Set the switches ‘-ObjC’ and ‘-all_load’
  1. Under the Info tab, add a Bundle display name key (CFBundleDisplayName).

  2. Insert the URL schema in the application settings to open the instrumented IPA from RxServices or Ranorex Studio, for more information review the iOS Service App page. Below, an example of a schema:

  1. Run the RxServices IPA, put it into the background, and next, run the instrumented IPA and put it in the background as well. This makes the application recognizable by the RxServices IPA.

The new IPAs should display in the list of available IPAs in the RxServices application and in Ranorex Studio.

After performing these steps, your project can be built using the newly created target and scheme for your iOS devices as well as simulators.

Successfully instrumented app



Get the latest test automation information right in your mailbox.


© 2024 Ranorex GmbH. All Rights Reserved