-
Notifications
You must be signed in to change notification settings - Fork 370
Hot Topics
The topics on this page change regularly.
Beware of linking directly to topic headers.
- Xcode 6.3 - instruments cannot launch my app on iOS 8.3 Simulators [RESOLVED]
- NSLog output can cause apps to become unresponsive during testing.
- cucumber is not compatible with ruby 2.2.*
- The app launches, then quits several times in rapid succession. (RunLoop::IncompatibleArchitecture)
- Enable Development After Upgrading Devices to 8.*
- Errno::EINTR: Interrupted system call
Starting in Xcode 6.3 instruments has been unable to launch apps that are already installed on the iOS 8.3 Simulator.
Waiting for device to boot...
Instruments Trace Error : Target failed to run: The operation couldn’t be completed.
(FBSOpenApplicationErrorDomain error 8.) : Failed to launch process with bundle identifier
'com.lesspainful.example.LPSimpleExample-cal'
This issue has been resolved with run-loop 1.3.1.
- Xcode 6.3 instruments cannot launch an app that is already installed on iOS 8.3 Simulators #744
- Updating your run-loop version
If your app becomes unresponsive during testing, check your device or simulator logs for an unusual or a high volume of NSLog output.
It has been demonstrated that a spike in NSLog output can cause the UIAutomation API to become unresponsive. This has been reproduced using the Instruments.app with applications that are not linked with the calabash.framework. This is an Apple bug.
# Shell A
$ xcrun instruments -s devices
<snip>
iPhone 5s (8.1 Simulator) [08B232DB-82B9-43F0-85EA-D769D5697306]
<snip>
$ tail -f ~/Library/Logs/CoreSimulator/08B232DB-82B9-43F0-85EA-D769D5697306/system.log
# Shell B
$ be DEVICE_TARGET="iPhone 5s (8.1 Simulator)" cucumber
You can view device logs from Xcode.
- Open Xcode and use Command + Shift + 2 to show the Devices window.
====
====
You can also tail device logs with idevicesyslog
. NOTE: We do not maintain the ideviceinstaller, libimobiledevice, or homebrew tools. This is third-party software. If you have issues with these tools, you are on your own. Please do not report problems with these tools on the Calabash channels.
# Install with homebrew.
$ brew install ideviceinstaller
$ xcrun instruments -s devices
<snip>
denis (8.1) [19xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx0d]
<snip>
# Shell A
$ idevicesyslog -u 19xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx0d
$ Shell B
$ be DEVICE_TARGET=https://denis.local:37265 DEVICE_TARGET="19xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx0d" cucumber
$ be cucumber --version
1.3.18
$ be cucumber -p ios
Using the ios, ios_common, common, ios_tags and ios_requires profiles...
@test @wip
Feature: My Awesome Feature
Background: I am logged in and looking at the home page # features/awesome.feature:5
undefined method `extend_world' for nil:NilClass (NoMethodError)
You can downgrade to ruby <= 2.1.* or include 'minitest' in your Gemfile.
### Sample Gemfile
source 'https://rubygems.org'
gem 'minitest'
gem 'calabash-cucumber', '0.12.3'
The progress of ruby 2.2.0 support and cucumber is being tracked in this issue: ruby 2.2.0 + cucumber 1.3.18 raises undefined method `extend_world' for nil:NilClass
When targeting a Simulator, the app launches, then quits several times in rapid succession.
The problem is that the binary in 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.
Here are some steps you can take to solve this problem.
Make sure you have the latest version of calabash and the latest version of the framework. [1] If you are not using bundler already, now would be a good time to start. [2]
UPDATE Calabash 0.12.0 will raise an error if the .app is incompatible for the target simulator.
# Resets _all_ the simulators
$ bundle exec calabash-ios sim reset
Here is an example of a xcodebuild
command that will build an .app that is compatible for all simulators.[3][4]
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. [5]
$ export APP="./build/Build/Products/Debug-iphonesimulator/YourApp.app"
$ bundle exec cucumber
Adjust the build settings of your Calabash target to always build a compatible binary.
- [1] Updating Calabash
- [2] Why use bundler?
- [3] Animated Happiness Build Script
- [4] Briar iOS Example Build Script
- [5] APP and APP_BUNDLE_PATH API docs
- Link to Gist - https://gist.github.com/jmoody/7543629290b7e192a261
See also these two issues:
- When targeting a Simulator, the app launches every second in a loop https://github.com/calabash/calabash-ios/issues/645
- Launch screen appears and disappears again and again when targeting a simulator https://github.com/calabash/calabash-ios/issues/649
The Settings.app > Developer
table view row disappears after updating to iOS 8.1.1 or higher. 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.
See the discussion here: https://github.com/calabash/run_loop/issues/35
This is an active issue; no comprehensive solution exists yet.
You can see this error if:
- The bundle identifier is incorrect.
- The device is not enabled for UIAutomation. Starting in iOS 8, you must enable UIAutomation on the device using the switch in Settings.app > Developer > Enable UIAutomation.
- The device is not enabled for development. We have observed that devices can change from enabled to disabled for development when migrating from iOS 7 to iOS 8 and between iOS 8 betas. The best practice is to restart the device after migrating. See instructions below for verifying that your device is enabled using the Instruments.app.
- The device should appear in Xcode's Devices window (Shift + Command + 2) without a yellow warning.
- The device must appear in Xcode's Scheme > Target device list as eligible. See below for a screenshot.
To work-around 3, 4, and 5, you can try plugging the problem device into another Mac that is running Yosemite and the latest (non-beta) version of Xcode.
There is a simple, definitive test to determine if the Xcode toolchain or Calabash is blame. [1] Please report results in the run-loop GitHub issue. [2]
- [1] https://gist.github.com/jmoody/dad5466e4b9a2d456432
- [2] https://github.com/calabash/run_loop/issues/35
- Connect the device via USB.
- Open Instruments.app for your current version of Xcode.
- Select the Automation template
- In the top left corner of the window, select your device and the a target application.
If your device is not enabled for development, Instruments.app will tell you to open Xcode to enable the device for development.