Skip to content

Instantly share code, notes, and snippets.

View Ashton-W's full-sized avatar

Ashton Williams Ashton-W

View GitHub Profile
@Ashton-W
Ashton-W / Extra Logging for My Great App.mobileconfig
Created October 26, 2016 22:55 — forked from zwaldowski/Extra Logging for My Great App.mobileconfig
Apple Configuration Profile for Logging in iOS 10 and macOS Sierra
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<!-- iOS 10, macOS Sierra, and friends bring a new logging subsystem that's
supposed to scale from the kernel, up to frameworks, and up to apps. It defaults
to a more regimented, privacy-focused approach that large apps and complex
systems need.
It, along with Activity Tracing introduced in iOS 8 and macOS Yosemite and the
Console app in macOS Sierra, hope to help you graduate from caveman debugging to
@Ashton-W
Ashton-W / RemoveATSExceptions.sh
Last active October 15, 2022 03:46
Xcode Build Phase Script to remove NSAppTransportSecurity from the Info.plist based on the custom REMOVE_ATS_EXCEPTIONS build setting.
#!/usr/bin/env bash
# Build Phase Script for removing NSAppTransportSecurity exceptions from Info.plist
# https://gist.github.com/Ashton-W/07654259322e43a2b6a50bb289e72627
set -o errexit
set -o nounset
if [[ -z "${REMOVE_ATS_EXCEPTIONS+SET}" ]]; then
echo "error: User Defined Build Setting REMOVE_ATS_EXCEPTIONS must be set"
exit 1
@Ashton-W
Ashton-W / pi.fish
Created July 13, 2016 07:12
CocoaPods Fish Functions
function pi --description 'pod install'
if test -e Gemfile
command bundle exec pod install --no-repo-update
else
command pod install --no-repo-update
end
end
@Ashton-W
Ashton-W / Issue.md
Last active October 21, 2024 23:21
GitHub Markdown toggle code block
Click to toggle contents of `code`
CODE!
@Ashton-W
Ashton-W / .lldbinit
Created April 19, 2016 04:27
LLDB sim_location command (lldbinit)
command alias sim_location expr (void)NSLog(@"Printing Simulator App Paths:\n\nBundle:\n%@\n\nDocuments:\n%@\n\n", [[NSBundle mainBundle] resourcePath], [[[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject] resourceSpecifier]);
@Ashton-W
Ashton-W / ExpectationDelegateProxy.h
Last active October 10, 2017 15:37
Implementation of an XCTestExpectation for delegate calls. More here http://www.ashton-w.net/2016/01/23/Asynchronous-Testing.html
#import <Foundation/Foundation.h>
#import <XCTest/XCTest.h>
NS_ASSUME_NONNULL_BEGIN
@interface ExpectationDelegateProxy : NSProxy
@property (nonatomic) SEL selector;
@property (nonatomic) Protocol *protocol;
@property (nonatomic) XCTestExpectation *expectation;
@Ashton-W
Ashton-W / RevealBuildPhase.sh
Last active December 13, 2020 02:28
Build Phase Script for copying and signing libReveal in Debug Configuration
#!/usr/bin/env bash
# Build Phase Script for copying and signing libReveal based on Configuration
# https://gist.github.com/Ashton-W/6db611ac93be2f8bad7f
set -o errexit
set -o nounset
LIBREVEAL_PATH="/Applications/Reveal.app/Contents/SharedSupport/iOS-Libraries/libReveal.dylib"
INJECT_REVEAL="${INJECT_REVEAL:-NO}"
@Ashton-W
Ashton-W / WWDC Video Transcripts No Scroll.user.js
Created October 13, 2015 09:05
User script that removes max-height of WWDC video transcripts, no more scrolls
// ==UserScript==
// @name WWDC Video Transcripts No Scroll
// @namespace http://wwdc/
// @version 0.1
// @description removes max-height of WWDC video transcripts, no more scrolls
// @author You
// @include https://developer.apple.com/videos/play/*
// @grant GM_addStyle
// ==/UserScript==
@Ashton-W
Ashton-W / CopyConfigurationResources.sh
Last active December 13, 2020 01:21
CopyConfigurationResources Xcode Build Phase Script
#!/usr/bin/env bash
# Build Phase Script for use in Xcode
# Copy Resources based on Configuration
#
# https://gist.github.com/Ashton-W/a47ec8b128ecbe470632
set -o nounset
# From Build Environment
#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'