Skip to content

Instantly share code, notes, and snippets.

View stevethomp's full-sized avatar

Steven Thompson stevethomp

  • Senior Mobile Developer at @Shopify
  • Ottawa, Canada
View GitHub Profile
@rbobbins
rbobbins / ui_testing_in_xcode.md
Last active February 23, 2018 08:28
UI Testing in Xcode

Wil Turner, Brook Callhan: Speakers

##3 Main components/concepts that enable UI Testing:##

  • UITesting
    • Find and interact w/ UI elements
    • Validate UI properties and state
  • UIrecording
    • Updated test reports to include UI testing data
    • UI testing is enabled by XCTest and UI Accesibility
@iamjason
iamjason / us-states-array
Created December 29, 2014 01:31
Swift US States Array
let state = [ "AK - Alaska",
"AL - Alabama",
"AR - Arkansas",
"AS - American Samoa",
"AZ - Arizona",
"CA - California",
"CO - Colorado",
"CT - Connecticut",
"DC - District of Columbia",
"DE - Delaware",
@benrudhart
benrudhart / gist:1525c82fea925c985b90
Last active August 29, 2015 14:09 — forked from shiningabdul/gist:8634264
Script for Uploading an xcode archive to HockeyApp with Xcode Server 4.0 using Xcode 6.1. Automatically creates a markdown change log based on the commit bodies from accepted pull requests.
# Valid and working as of 11/10/2014
# Xcode 6.1, XCode Server 4.0
#Upload Archive to HockeyApp
#Settings
PRODUCT_NAME="<Product name>"
PRODUCT_FOLDER="<Product Folder>"
SIGNING_IDENTITY="<identity>"
#"This has to be exactly what you see in Keychain -> My Certificates"
// See: https://devforums.apple.com/message/1000934#1000934
import Foundation
// Logic
operator prefix ¬ {}
@prefix func ¬ (value: Bool) -> Bool {
return !value
}
@julianjames
julianjames / build_number.sh
Last active December 25, 2015 21:09
We create a unique build number by taking the date and time and creating a hexadecimal version so as to not make it too obvious. This is written to project plist file.
buildNumber=`/bin/date +%Y%m%d%H%M%S`
hexNumber=`echo "obase=16;ibase=10; $buildNumber" | bc`
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $hexNumber" "${PROJECT_DIR}/${INFOPLIST_FILE}"
@zoul
zoul / OSStatus.m
Created October 19, 2010 08:21
Decode OSStatus error codes into strings.
NSString *NSStringFromOSStatus(OSStatus errCode)
{
if (errCode == noErr)
return @"noErr";
char message[5] = {0};
*(UInt32*) message = CFSwapInt32HostToBig(errCode);
return [NSString stringWithCString:message encoding:NSASCIIStringEncoding];
}