Skip to content

Instantly share code, notes, and snippets.

Joshua Moody jmoody

Block or report user

Report or block jmoody

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jmoody
jmoody / Screenshotter.m
Last active Dec 5, 2019
Add a step and a screenshot to your Test Cloud report
View Screenshotter.m
#import <XCTest/XCTest.h>
#import "Screenshotter.h"
@implementation Screenshotter
+ (void)screenshotWithTitle:(NSString *)format, ... {
NSString *title = nil;
va_list args;
va_start(args, format);
@jmoody
jmoody / .bashrc
Created Jan 20, 2016
Jenkins LaunchAgent and scripts for El Capitan
View .bashrc
# Can be more or less complicated depending on your CLI needs.
export HISTCONTROL=erasedups
export HISTSIZE=5000
shopt -s histappend
export VISUAL=less
export EDITOR=vim
export GIT_EDITOR="${EDITOR}"
@jmoody
jmoody / navbar_steps.rb
Created Jul 27, 2012
calabash-cucumber steps for dealing with the navigation bar
View navbar_steps.rb
def navbar_visible?
!query('navigationBar').empty?
end
def navbar_has_back_button?
!query("navigationItemButtonView").empty?
end
def navbar_should_have_back_button
unless navbar_has_back_button?
@jmoody
jmoody / tmate-on-macOS.md
Last active Feb 15, 2018
tmate on macOS
View tmate-on-macOS.md

Tmate is a remote tmux session over ssh.

Intall with Homebrew

$ brew update && brew upgrade
$ brew install tmux
$ brew install reattach-to-user-namespace
$ brew install tmate
@jmoody
jmoody / README.md
Last active Dec 14, 2017
diffing binary plists and mobileprovisions
View README.md

~/.gitatrributes

*.plist diff=plist
*.mobileprovision diff=mobileprovision

~/.gitconfig

@jmoody
jmoody / contents.md
Created Aug 10, 2017
NSLog output can cause apps to become unresponsive during testing
View contents.md

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

Viewing Simulator Logs

@jmoody
jmoody / export-crash-report.md
Last active May 21, 2017
Export a Crash Report From Xcode 6
View export-crash-report.md

Xcode 6

  1. Plug in the device and open Xcode
  2. Choose Window -> Devices from the Xcode menu
  3. Under the DEVICES section in the left column, choose the device
  4. To see crash logs, select the View Device Logs button under the Device Information section on the right hand panel
  5. Find your app in the Process column and select the Crash log to see the contents.
  6. IMPORTANT Be sure to symbolicate your crash report.
  7. Export the symbolicated crash report.
@jmoody
jmoody / .gitignore
Last active Nov 14, 2016
.gitignore template for calabash
View .gitignore
# emacs backup files
(.*/)?\#[^/]*\#$
# binaries
*.ipa
*.app
*.apk
## Mac OS X
.DS_Store
@jmoody
jmoody / rbenv-install-with-options.sh
Last active Oct 26, 2016
Script for compiling a ruby with readline and OpenSSL support using rbenv and homebrew
View rbenv-install-with-options.sh
#!/usr/bin/env bash
# Do not name this file 'rbenv-install' - that is an rbenv terminal command.
# Put this file in your PATH (e.g. ~/bin/)
#
# Usage:
# rbenv-install-with-options.sh 2.3.1
RUBY_CONFIGURE_OPTS="--with-readline-dir=$(brew --prefix readline) --with-openssl-dir=$(brew --prefix openssl)" \
rbenv install "${1}"
@jmoody
jmoody / permissions.rb
Created Sep 19, 2016
Wait for photo rollo
View permissions.rb
When(/^I touch the Photos row$/) do
expect_action_label_ready_for_next_alert
tap_row("photos")
end
Then(/^I see the Photos alert$/) do
if uia_available?
# Impossible to wait for the alert because it is automatically dismissed
else
# With DeviceAgent, we can wait for the alert. It is the next query or
You can’t perform that action at this time.