Skip to content

Instantly share code, notes, and snippets.

@JoeMatt
JoeMatt / Carthage.sh
Last active November 14, 2019 21:19
Improve Carthage performance with Per-target manifest caching and optional Fastlane usage
set -e
# carthage.sh : smarter carthage updating and caching by Joe Mattiello
#
# Inspired from http://shashikantjagtap.net/cache-carthage-speed-ios-continuous-integration/
#
# The purpose of this script is to reduce the amount of checkouts Carthage runs.
# I use this script in an XCode 'run script' build phase as the first phase before compiling
# If you have mutliple targets, projects, frameworks etc, you can include this script in each and it will selec
# the correct Carthage folder for each target.
@JoeMatt
JoeMatt / MappableCore.swift
Created March 1, 2018 02:14
Example for using swift protocol defaults and generics with keyPaths to reduce code
// Can maybe use this generic keypath and then narrow it downn later
// You can't use KeyPath<T, GCControllerElement> and then pass a
// keyPath to a GCControllerButtonInput property even though in inherits.
// No idea why or what the work around is but I'm sure there is a proper way
// to make this generic
protocol BoolRepresentableInput {
var isPressed: Bool { get }
}
protocol FloatRepresentableInput {
#!/bin/sh
#set -e
#set -o pipefail
# Fix code signing in embedded iOS frameworks
destination="${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
echo "destination ${destination}"
## Signs a framework with the provided identity
code_sign_if_enabled() {