rtwBuildXcode.sh script

To instrument an iOS application, you must run the rtwBuildXcode.sh script with the appropriate parameters. You can also push the instrumented application to the test workbench and install it on an iOS device, the iOS Simulator, or both by using the same build script.
Note: Before using the shell scripts, be sure that you have permission to execute shell scripts. If necessary, use chmod to update your permissions.

The rtwBuildXcode.sh script provides support for both Xcode projects and Xcode workspaces. An Xcode workspace lets you group together multiple Xcode projects and other files to make it easier to work on them together.

To run the script, enter one of the following command lines in your Macintosh terminal with the parameters adapted to your work context.

unpack_dir/build-script/rtwBuildXcode.sh RTWinvestigate app.xcodeproj Workbench URL simu|device|both 
unpack_dir/build-script/rtwBuildXcode.sh RTWinvestigate app.xcworkspace scheme Workbench URL simu|device|both 
Where:
  • unpack_dir is the directory where you extracted the downloaded archive.
  • RTWinvestigate is optional. You can add the RTWinvestigate option to the rtwBuildXcode command to build a RTWinvestigate.zip file. This file collects data generated during the instrumentation process that you can use to troubleshoot instrumentation issues.
  • app.xcodeproj is the absolute or relative path to the .xcodeproj created for the application under test. If the name or the path to the Xcodeproj file contains spaces, enclose the full path with double quotes (" "), or replace all spaces by backslashes (\).
  • app.xcworkspace is the absolute or relative path to the .xcworkspace that includes the .xcodeproj for the application under test. If the name or the path contains spaces, enclose the full path with double quotes (" "), or replace all spaces by backslashes (\). For details, see the Apple Developer documentation at Xcode workspaces.
  • scheme is a collection of Xcode settings that include project build targets, a build configuration, and the executable environment for running the product. For details, see the Apple Developer documentation at Xcode schemes.
  • Workbench URL indicates the Workbench URL copied from the Mobile Device editor. Including the Workbench URL is highly recommended, because this is the easiest way to register an application to the test workbench. The test workbench needs to know the application when it receives the recording log in order to produce a complete test. In a context in which the Workbench URL is used from the rtwBuildXcode.sh shell-script, do not include mobile at the end of the Workbench URL. As an example, indicate http://<ip-address>:7878 only.
    Note: If you specify the Workbench URL in the command line, the instrumented application is automatically pushed to the test workbench. If you do not specify the Workbench URL in the command line, you can add the application under test to the test workbench by clicking Add applications to list in the Mobile Applications editor.
  • simu|device|both are optional parameters to indicate that you want to upload the instrumented application to the iOS Simulators on the Macintosh computer, to an iOS device, or to both. The Simulators will be automatically restarted to use this new application. To upload to a device, the device must be connected to the Mac via USB.
Feedback