Skip to content

Instantly share code, notes, and snippets.

View jmoody's full-sized avatar

Joshua Moody jmoody

  • Germany
View GitHub Profile
@jmoody
jmoody / run_loop.out.md
Created January 6, 2015 01:16
:host strategy is hanging intermittently on iOS 7 device - run_loop #99

There were ~3000 lines. I trimmed out all the **** lines.

2015-01-05 18:55:53.219 instruments[35602:116064] WebKit Threading Violation - initial use of WebKit from a secondary thread.
2015-01-05 17:55:56 +0000 Default: OUTPUT_JSON:
{"output":"Starting loop"}
END_OUTPUT
2015-01-05 17:55:56 +0000 Default: ****
2015-01-05 17:55:59 +0000 Default: OUTPUT_JSON:
@jmoody
jmoody / compatible-binaries.md
Created December 12, 2014 12:16
Hot Topic: When targeting a Simulator, the app launches, then quits several times in rapid succession.

1. 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]

We want to merge the Calabash Android and iOS gesture APIs.

Calabash Android has a three options that can be passed to a gesture:

  1. x => a percentage; how far away from the top-left corner on the x-axis to perform the gesture
  2. y => a percentage; how far away from the top-right corner on the y-axis to perform the gesture
  3. offset => {:x, :y} - how many points from the center of the view to perform the gesture

The x and y relative percentage is applied first and then from that point, the offset is calculated.

@jmoody
jmoody / topic.md
Created December 3, 2014 11:44
Archive of "Errno::EINTR: Interrupted system call" run-loop issue #35 from calabash-ios wiki Hot Topics

2. Errno::EINTR: Interrupted system call

See the discussion here: calabash/run_loop#35

This is an active issue; no comprehensive solution exists yet.

You can see this error if:

  1. The bundle identifier is incorrect.
  2. 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.
@jmoody
jmoody / crash-report.md
Created November 18, 2014 00:25
Xcode 6.1.1 GM ScriptAgent crashes when calling UIAApplication preferencesValueForKey:
  • Mavericks 10.9.5
  • calabash-ios 0.11.4
  • run-loop 1.1.1.pre3
  • calabash-ios-server 0.11.4
Process:         ScriptAgent [66861]
Path:            /Xcode/*/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/Developer/Library/Daemons/PlugIns/UIAutomation.bundle/ScriptAgent
Identifier:      ScriptAgent
@jmoody
jmoody / errno-reproduce.md
Created November 17, 2014 18:14
Errno::EINTR: Interrupted system call @ rb_sysopen #35

Extracted from: calabash/run_loop#35

If instruments fails to execute the script using the method below, the problem is on Apple's side of the fence and there is very little we can do besides file bug reports and keep trying to discover the magical ritual that makes it work.

If instruments can execute the script using the method below, then we need to dig deeper into this issue.

Reproduce

  1. Install your app on the problem device; it can be any app that you have the bundle identifier for.
  2. Make a note of your device identifier.
@jmoody
jmoody / run-loop-log.md
Created October 23, 2014 11:39
failure of touch on iPad 7.1.2 in landscape mode

{"status"=>"error", "value"=>"VerboseError: null", "backtrace"=>"fail__delegate@file:///Users/moody/git/briar-ios-example/Briar/762F73BD-7C52-498D-A565-A195333BA1B7/_run_loop.js:20854:28\nfail@file:///Users/moody/git/briar-ios-example/Briar/762F73BD-7C52-498D-A565-A195333BA1B7/_run_loop.js:20861:31\nfile:///Users/moody/git/briar-ios-example/Briar/762F73BD-7C52-498D-A565-A195333BA1B7/_run_loop.js:21352:38\nfile:///Users/moody/git/briar-ios-example/Briar/762F73BD-7C52-498D-A565-A195333BA1B7/_run_loop.js:11579:38\nlazy_seq_value@file:///Users/moody/git/briar-ios-example/Briar/762F73BD-7C52-498D-A565-A195333BA1B7/_run_loop.js:8173:24\ncljs$core$ISeq$_first$arity$1@file:///Users/moody/git/briar-ios-example/Briar/762F73BD-7C52-498D-A565-A195333BA1B7/_run_loop.js:8224:66\n_first@file:///Users/moody/git/briar-ios-example/Briar/762F73BD-7C52-498D-A565-A195333BA1B7/_run_loop.js:2763:46\nfirst@file:///Users/moody/git/briar-ios-example/Briar/762F73BD-7C52-498D-A565-A195333BA1B7/_run_loop.js:4231:35\ncljs$core$ISeq$_first

@jmoody
jmoody / .env
Created August 21, 2014 21:45
example of how to use bundler + github + local repos to work with the calabash-ios toolchain
# Put this in the directory where your calabash.framework is.
# I hope that is the same directory where you execute cucumber from...
# Update the values to match your environment.
# replace with your bundle id
BUNDLE_ID=com.littlejoysoftware.Briar-cal
# to use $ bundle exec briar install calabash-server
CALABASH_SERVER_PATH="${HOME}/git/calabash-ios-server"
CALABASH_GEM_PATH="${HOME}/git/calabash-ios"
@jmoody
jmoody / .gitignore
Last active November 14, 2016 21:51
.gitignore template for calabash
# emacs backup files
(.*/)?\#[^/]*\#$
# binaries
*.ipa
*.app
*.apk
## Mac OS X
.DS_Store
@jmoody
jmoody / xcodebuild.md
Created August 13, 2014 20:46
xcodebuild output vs. xcpretty output for the same compiler error
** BUILD FAILED **


The following build commands failed:
	CompileC build/calabash.build/Debug-iphonesimulator/calabash-simulator.build/Objects-normal/i386/CalabashServer.o calabash/Classes/CalabashServer.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)