From 0a8dfc1f9dc88b2d73c84a87d5f84b14194fd979 Mon Sep 17 00:00:00 2001 From: Vlad Date: Mon, 11 Jan 2021 12:08:01 +0300 Subject: [PATCH] Update .travis.yml --- .travis.yml | 12 ++++++------ Package.swift | 2 +- RxKeyboard.podspec | 2 +- Sources/RxKeyboard/RxKeyboard.swift | 2 +- scripts/carthage.sh | 21 +++++++++++++++++++++ 5 files changed, 30 insertions(+), 9 deletions(-) create mode 100755 scripts/carthage.sh diff --git a/.travis.yml b/.travis.yml index dc96e3e..d7dd4b1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -osx_image: xcode10.2 +osx_image: xcode12.3 language: objective-c sudo: required env: @@ -6,12 +6,12 @@ env: - PROJECT="RxKeyboard.xcodeproj" - SCHEME="RxKeyboard-Package" - IOS_SDK="iphonesimulator" - - MACOS_SDK="macosx10.14" - - TVOS_SDK="appletvsimulator12.2" - - WATCHOS_SDK="watchsimulator5.2" + - MACOS_SDK="macosx11.0" + - TVOS_SDK="appletvsimulator9.0" + - WATCHOS_SDK="watchsimulator3.0" - FRAMEWORK="RxKeyboard" matrix: - - SDK="$IOS_SDK" TEST=0 SWIFT_VERSION=5.0 DESTINATION="platform=iOS Simulator,name=iPhone 8" + - SDK="$IOS_SDK" TEST=0 SWIFT_VERSION=5.1 DESTINATION="platform=iOS Simulator,name=iPhone 8" install: - swift --version @@ -49,7 +49,7 @@ before_deploy: - bundle exec swiftproj configure-scheme --project RxKeyboard.xcodeproj --scheme RxKeyboard-Package --buildable-targets RxKeyboard - bundle exec swiftproj remove-framework --project RxKeyboard.xcodeproj --target RxKeyboard --framework RxCocoa.framework - bundle exec swiftproj remove-framework --project RxKeyboard.xcodeproj --target RxKeyboard --framework RxCocoaRuntime.framework - - carthage bootstrap + - ./carthage.sh bootstrap - carthage build --no-skip-current --verbose | xcpretty -c - carthage archive RxKeyboard diff --git a/Package.swift b/Package.swift index fff07b0..0198bf0 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.0 +// swift-tools-version:5.1 import PackageDescription diff --git a/RxKeyboard.podspec b/RxKeyboard.podspec index a1e64aa..a2d8890 100644 --- a/RxKeyboard.podspec +++ b/RxKeyboard.podspec @@ -10,7 +10,7 @@ Pod::Spec.new do |s| s.source_files = 'Sources/**/*.swift' s.frameworks = 'UIKit' s.requires_arc = true - s.swift_version = "5.0" + s.swift_version = "5.1" s.dependency 'RxSwift', '~> 6.0' s.dependency 'RxCocoa', '~> 6.0' diff --git a/Sources/RxKeyboard/RxKeyboard.swift b/Sources/RxKeyboard/RxKeyboard.swift index f92ad2b..b59ce21 100644 --- a/Sources/RxKeyboard/RxKeyboard.swift +++ b/Sources/RxKeyboard/RxKeyboard.swift @@ -159,7 +159,7 @@ extension RxKeyboard: UIGestureRecognizerDelegate { _ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer ) -> Bool { - return gestureRecognizer === self.panRecognizer + gestureRecognizer === self.panRecognizer } } diff --git a/scripts/carthage.sh b/scripts/carthage.sh new file mode 100755 index 0000000..e21348f --- /dev/null +++ b/scripts/carthage.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +# carthage.sh +# Usage example: ./carthage.sh build --platform iOS + +set -euo pipefail + +xcconfig=$(mktemp /tmp/static.xcconfig.XXXXXX) +trap 'rm -f "$xcconfig"' INT TERM HUP EXIT + +# For Xcode 12 make sure EXCLUDED_ARCHS is set to arm architectures otherwise +# the build will fail on lipo due to duplicate architectures. + +CURRENT_XCODE_VERSION=$(xcodebuild -version | grep "Build version" | cut -d' ' -f3) +echo "EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200__BUILD_$CURRENT_XCODE_VERSION = arm64 arm64e armv7 armv7s armv6 armv8" >> $xcconfig + +echo 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200 = $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200__BUILD_$(XCODE_PRODUCT_BUILD_VERSION))' >> $xcconfig +echo 'EXCLUDED_ARCHS = $(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT)__XCODE_$(XCODE_VERSION_MAJOR))' >> $xcconfig + +export XCODE_XCCONFIG_FILE="$xcconfig" +carthage build "$@" \ No newline at end of file