Skip to content

Instantly share code, notes, and snippets.



Created Aug 10, 2017
What would you like to do?
NSLog output can cause apps to become unresponsive during testing

2. NSLog output can cause apps to become unresponsive during testing.

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 with applications that are not linked with the calabash.framework. This is an Apple bug.

Viewing Simulator Logs

# Shell A
$ xcrun instruments -s devices
iPhone 5s (8.1 Simulator) [08B232DB-82B9-43F0-85EA-D769D5697306]
$ tail -f ~/Library/Logs/CoreSimulator/08B232DB-82B9-43F0-85EA-D769D5697306/system.log

# Shell B
$ be DEVICE_TARGET="iPhone 5s (8.1 Simulator)" cucumber

Viewing Device Logs

You can view device logs from Xcode.

  1. 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
denis (8.1) [19xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx0d]

# Shell A
$ idevicesyslog -u 19xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx0d

$ Shell B
$ be DEVICE_TARGET=https://denis.local:37265 DEVICE_TARGET="19xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx0d" cucumber
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.