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 / 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 / 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
@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 / 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 / bundle-id.sh
Created Oct 15, 2015
Bash script for extracting CFBundleIdentifier from .app or .ipa (MacOS only)
View bundle-id.sh
#!/usr/bin/env bash
function error {
echo "$(tput setaf 1)ERROR: $1$(tput sgr0)"
}
function usage {
echo "Usage: bundle-id.sh /path/to/App.{ipa | app}"
}
@jmoody
jmoody / excessive-instruments-output.md
Created Sep 21, 2015
Output of instruments to reproduce stalled popen3 read.
View excessive-instruments-output.md
Known Devices:
Jonathan’s MacBook Pro [515AE48F-E983-5E3C-8E87-8AA3A78813F8]
Apple TV 1080p (9.0) [494728A1-EBE6-419A-A751-313CB09FF53B]
Apple Watch - 38mm (2.0) [1FC45635-4F46-47E5-B0FB-93D45F6A9C24]
Apple Watch - 38mm (2.0) [73ECD831-EE38-40FE-8B45-6B0FB980F78B]
Apple Watch - 38mm (2.0) [BB8E2C79-66A7-4CC1-9CB4-3EA7C8819F75]
Apple Watch - 38mm (2.0) [98E0F2AB-2B43-43F4-97BF-ABB2E2483F86]
Apple Watch - 38mm (2.0) [0B82845D-7C95-4AFF-9A86-913AE4F3B96D]
Apple Watch - 38mm (2.0) [B4304E5A-3B09-4AE7-9569-0466DFE6A6B6]
@jmoody
jmoody / crash.md
Created Sep 8, 2015
Xcode 7 beta 6 crashes when trying to launch an app that is not installed on iOS Simulator
View crash.md
Process:               instruments [28786]
Path:                  /Xcode/*/Xcode-beta.app/Contents/Developer/usr/bin/instruments
Identifier:            instruments
Version:               $[MARKETING_VERSION] (58156.1)
Code Type:             X86-64 (Native)
Parent Process:        ruby [28667]
Responsible:           Terminal [340]
User ID:               502
You can’t perform that action at this time.