Troubleshooting

Fixing common issues when running test on local devices

PDF for offline use

Let us know how you feel about this

Translation Quality


0/250

last updated: 2016-10

This guide will discuss some of the issues that can occur when trying to run UITests on local devices.

Overview

This guide will discuss some of the issues that can occur when trying to run UITests on local devices.

Enable Development After Upgrading Devices to iOS 8.x

The Settings > Developer table view row disappears after updating to iOS 8.1.1. The device will not be ready for Calabash testing until it has been re-enabled for Development. Open Xcode and navigate to the Devices window (Shift + Command + 2). Wait for Xcode to finish copying symbols and then check the device's Settings.app for the Developer settings.

Once this is done, reboot the device.

Does not contain a compatible architecture for target device (RunLoop::IncompatibleArchitecture)

Symptoms: When targeting a Simulator, the app launches, then quits several times in rapid succession.

The problem is that the binary is incompatible with the simulator version.

For example, if you build an app iPhone 6 Simulator it will contain an x86_64 instruction slice. You can install this binary on an iPhone 4s simulator, but it will not launch because the iPhone 4s Simulator because that simulator requires an i386 instruction set. Simply put, you must build an app that is compatible for the simulator you are targeting.

Clear the Simulator Content & Settings:

The following command line will reset all simulators to their factory state:

$ bundle exec calabash-ios sim reset

Building Compatible Binaries using xcodebuild:

Here is an example of a xcodebuild command that will build an .app that is compatible for all simulators:

$ xcrun xcodebuild \
    -SYMROOT=build \
    -derivedDataPath build \
    ARCHS="i386 x86_64" \
    VALID_ARCHS="i386 x86_64" \
    ONLY_ACTIVE_ARCH=NO \
    -project ./path/to/your/.xcproject directory \
    -scheme "The Name of your Calabash Scheme" \
    -sdk iphonesimulator \
    -configuration DEBUG \
    clean build

The .app can be found in this directory: ./build/Build/Products/Debug-iphonesimulator/YourApp.app. Use this path as your APP path.

Building Compatible Binaries using Xcode

Adjust the build settings of your Calabash target to always build a compatible binary.

ℹ️

Calabash 0.12.0 will raise an error if the .app is an incompatible architecture for the target simulator.

Xamarin Workbook

If it's not already installed, install the Xamarin Workbooks app first. The workbook file should download automatically, but if it doesn't, just click to start the workbook download manually.