This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public protocol ControlStateProtocol : Hashable {} | |
public enum ConfuciusControlState : OptionSetType { | |
#if os(iOS) || os(watchOS) || os(tvOS) | |
public typealias RawValue = UIControlState | |
#else | |
public typealias RawValue = Int | |
#endif | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protocol Transformer { | |
associatedtype ValueType | |
associatedtype ReverseValueType | |
static func transform(value:ValueType) -> ReverseValueType | |
static func reverseTransform(value:ReverseValueType) -> ValueType? | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This script is based on Jacob Van Order's answer on apple dev forums https://devforums.apple.com/message/971277 | |
# See also http://spin.atomicobject.com/2011/12/13/building-a-universal-framework-for-ios/ for the start | |
# To get this to work with a Xcode 6 Cocoa Touch Framework, create Framework | |
# Then create a new Aggregate Target. Throw this script into a Build Script Phrase on the Aggregate | |
###################### | |
# Options |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal | |
if [ "true" == ${ALREADYINVOKED:-false} ] | |
then | |
echo "RECURSION: Detected, stopping" | |
else | |
export ALREADYINVOKED="true" | |
# Step 1. Build Device and Simulator versions | |
xcodebuild -target "${PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphoneos BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
UNIVERSAL_OUTPUTFOLDER=../build/ | |
# make the output directory and delete the framework directory | |
mkdir -p "${UNIVERSAL_OUTPUTFOLDER}" | |
rm -rf "${UNIVERSAL_OUTPUTFOLDER}/${PROJECT_NAME}.framework" | |
# Step 1. Build Device and Simulator versions | |
set -o pipefail && xctool -workspace "../${WORKSPACE_NAME}" -scheme "${PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphoneos BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build | xcpretty |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
desc "Zip and copy to right folder" | |
private_lane :package_framework do |lane| | |
if !lane[:framework] | |
raise "No framework specified!".red | |
end | |
if !lane[:version] | |
raise "No version specified!".red | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
desc "Deploy/upload framework" | |
private_lane :deploy_framework do |lane| | |
if !lane[:framework] | |
raise "No framework specified!".red | |
end | |
if !lane[:version] | |
raise "No version specified!".red | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fastlane_version "1.57.0" | |
require 'fileutils' | |
default_platform :ios | |
platform :ios do | |
desc "Increment framework version" | |
private_lane :increment_framework_version do |lane| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public typealias LazyMappedResults = LazyMapCollection<Self.Elements, Style<ValueType>> | |
public typealias LazyFilteredResults = LazyFilterCollection<LazyMappedResults> | |
public typealias LazyFlatMappedErrors = LazyMapCollection<LazyFilterCollection<LazyMapCollection<Self.Elements, ErrorType?>>, ErrorType> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Playground execution failed: Anhui.playground:192:8: error: binary operator '==' cannot be applied to operands of type 'LazyMapCollection<LazyFilterCollection<LazyMapCollection<LazyMapCollection<[SampleValidator<String>], ValidationResult<String>>, ErrorType?>>, ErrorType>' (aka 'LazyMapCollection<LazyFilterCollection<LazyMapCollection<LazyMapCollection<Array<SampleValidator<String>>, ValidationResult<String>>, Optional<ErrorType>>>, ErrorType>') and 'LazyMapCollection<LazyFilterCollection<LazyMapCollection<LazyMapCollection<LazyMapCollection<[SampleValidator<String>], ValidationResult<String>>, ValidationResult<String>>, ErrorType?>>, ErrorType>' (aka 'LazyMapCollection<LazyFilterCollection<LazyMapCollection<LazyMapCollection<LazyMapCollection<Array<SampleValidator<String>>, ValidationResult<String>>, ValidationResult<String>>, Optional<ErrorType>>>, ErrorType>') | |
errors == otherErrors | |
~~~~~~ ^ ~~~~~~~~~~~ | |
Anhui.playground:192:8: note: overloads for '==' exist with these partially matching parameter lists: ( |