Skip to content

Instantly share code, notes, and snippets.

@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() {