From acdfa3debeacbdf0f30536df09385a98141c19f0 Mon Sep 17 00:00:00 2001 From: Chris Ballinger Date: Tue, 14 May 2019 14:15:17 -0700 Subject: [PATCH 01/12] Swift 5 Migration --- Example/Pods/Pods.xcodeproj/project.pbxproj | 16 ++++++++++++---- .../xcschemes/Swiftilities.xcscheme | 10 +++++----- Example/Swiftilities.xcodeproj/project.pbxproj | 18 ++++++++++-------- .../xcschemes/Swiftilities-Example.xcscheme | 2 +- Pod/Classes/HairlineView/HairlineView.swift | 5 +++++ .../Keyboard/UIView+KeyboardLayoutGuide.swift | 6 ++++++ Pod/Classes/Math/CurveProvider.swift | 6 ++++++ 7 files changed, 45 insertions(+), 18 deletions(-) diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj index 95c1de5..dc4c714 100644 --- a/Example/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -707,14 +707,20 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0930; - LastUpgradeCheck = 0930; + LastUpgradeCheck = 1020; + TargetAttributes = { + 1B662FD90CB7EC9E1F08C667A318C576 = { + LastSwiftMigration = 1020; + }; + }; }; buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, + Base, ); mainGroup = 7DB346D0F39D3F0E887471402A8071AB; productRefGroup = EEFE79AC50C525DA6311BA38D0EA6206 /* Products */; @@ -845,6 +851,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; @@ -929,7 +936,7 @@ SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -1060,7 +1067,7 @@ SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; @@ -1106,6 +1113,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; diff --git a/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Swiftilities.xcscheme b/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Swiftilities.xcscheme index 32de03a..b8d9d35 100644 --- a/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Swiftilities.xcscheme +++ b/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Swiftilities.xcscheme @@ -1,6 +1,6 @@ @@ -42,7 +42,7 @@ @@ -64,7 +64,7 @@ @@ -82,7 +82,7 @@ diff --git a/Example/Swiftilities.xcodeproj/project.pbxproj b/Example/Swiftilities.xcodeproj/project.pbxproj index 750350d..59ffe0a 100644 --- a/Example/Swiftilities.xcodeproj/project.pbxproj +++ b/Example/Swiftilities.xcodeproj/project.pbxproj @@ -363,24 +363,24 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0720; - LastUpgradeCheck = 1000; + LastUpgradeCheck = 1020; ORGANIZATIONNAME = Raizlabs; TargetAttributes = { 607FACCF1AFB9204008FA782 = { CreatedOnToolsVersion = 6.3.1; - LastSwiftMigration = 1000; + LastSwiftMigration = 1020; ProvisioningStyle = Manual; }; 607FACE41AFB9204008FA782 = { CreatedOnToolsVersion = 6.3.1; - LastSwiftMigration = 1000; + LastSwiftMigration = 1020; ProvisioningStyle = Manual; }; }; }; buildConfigurationList = 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "Swiftilities" */; compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, @@ -577,6 +577,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -633,6 +634,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -691,7 +693,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = "iOS Development"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -709,7 +711,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Release; }; @@ -729,7 +731,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -745,7 +747,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Release; }; diff --git a/Example/Swiftilities.xcodeproj/xcshareddata/xcschemes/Swiftilities-Example.xcscheme b/Example/Swiftilities.xcodeproj/xcshareddata/xcschemes/Swiftilities-Example.xcscheme index ec86ae5..0430f75 100644 --- a/Example/Swiftilities.xcodeproj/xcshareddata/xcschemes/Swiftilities-Example.xcscheme +++ b/Example/Swiftilities.xcodeproj/xcshareddata/xcschemes/Swiftilities-Example.xcscheme @@ -1,6 +1,6 @@ =5.0) + @unknown default: + Log.error("ERROR: Unhandled NSLayoutConstraint.Axis case!") + break +#endif } return size diff --git a/Pod/Classes/Keyboard/UIView+KeyboardLayoutGuide.swift b/Pod/Classes/Keyboard/UIView+KeyboardLayoutGuide.swift index 92aec98..3d3d9cc 100755 --- a/Pod/Classes/Keyboard/UIView+KeyboardLayoutGuide.swift +++ b/Pod/Classes/Keyboard/UIView+KeyboardLayoutGuide.swift @@ -17,9 +17,15 @@ public extension UIView { /// A layout guide for the keyboard @nonobjc var keyboardLayoutGuide: UILayoutGuide? { + #if swift(>=5.0) + if let existingIdx = layoutGuides.firstIndex(where: { $0 is KeyboardLayoutGuide }) { + return layoutGuides[existingIdx] + } + #else if let existingIdx = layoutGuides.index(where: { $0 is KeyboardLayoutGuide }) { return layoutGuides[existingIdx] } + #endif return nil } diff --git a/Pod/Classes/Math/CurveProvider.swift b/Pod/Classes/Math/CurveProvider.swift index a9bff21..ef558fa 100644 --- a/Pod/Classes/Math/CurveProvider.swift +++ b/Pod/Classes/Math/CurveProvider.swift @@ -49,6 +49,12 @@ extension UIView.AnimationCurve: CurveProvider { case .easeInOut: controlPoint1 = CGPoint(x: 0.42, y: 0) controlPoint2 = CGPoint(x: 0.58, y: 1) +#if swift(>=5.0) + @unknown default: + Log.error("ERROR: Unhandled UIView.AnimationCurve case!") + controlPoint1 = .zero + controlPoint2 = .zero +#endif } return T(CubicBezier.value(for: CGFloat(inputPercent.doubleValue), controlPoint1: controlPoint1, From d8edd096fd1f0c56fe61c13bd5d5c705e790b58e Mon Sep 17 00:00:00 2001 From: Chris Ballinger Date: Tue, 14 May 2019 14:50:13 -0700 Subject: [PATCH 02/12] Fix pod linting --- Pod/Classes/HairlineView/HairlineView.swift | 2 +- Pod/Classes/Math/CurveProvider.swift | 2 +- Swiftilities.podspec | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Pod/Classes/HairlineView/HairlineView.swift b/Pod/Classes/HairlineView/HairlineView.swift index 9a2f729..3d408d1 100644 --- a/Pod/Classes/HairlineView/HairlineView.swift +++ b/Pod/Classes/HairlineView/HairlineView.swift @@ -96,7 +96,7 @@ open class HairlineView: UIView { case .vertical: size.width = thickness #if swift(>=5.0) @unknown default: - Log.error("ERROR: Unhandled NSLayoutConstraint.Axis case!") + debugPrint("ERROR: Unhandled NSLayoutConstraint.Axis case \(axis)!") break #endif } diff --git a/Pod/Classes/Math/CurveProvider.swift b/Pod/Classes/Math/CurveProvider.swift index ef558fa..36cb6a0 100644 --- a/Pod/Classes/Math/CurveProvider.swift +++ b/Pod/Classes/Math/CurveProvider.swift @@ -51,7 +51,7 @@ extension UIView.AnimationCurve: CurveProvider { controlPoint2 = CGPoint(x: 0.58, y: 1) #if swift(>=5.0) @unknown default: - Log.error("ERROR: Unhandled UIView.AnimationCurve case!") + debugPrint("ERROR: Unhandled UIView.AnimationCurve case \(self)!") controlPoint1 = .zero controlPoint2 = .zero #endif diff --git a/Swiftilities.podspec b/Swiftilities.podspec index 616af63..e165087 100644 --- a/Swiftilities.podspec +++ b/Swiftilities.podspec @@ -1,8 +1,8 @@ Pod::Spec.new do |s| s.name = "Swiftilities" - s.version = "0.22.1" + s.version = "0.23.0" s.summary = "A collection of useful Swift utilities." - s.swift_version = '4.2' + s.swift_version = '5.0' s.description = <<-DESC A collection of useful Swift utilities. All components and From 477cbb91aeb9d0f6343d47187a9b793e51845331 Mon Sep 17 00:00:00 2001 From: Chris Ballinger Date: Tue, 21 May 2019 12:22:50 -0700 Subject: [PATCH 03/12] Lint on both Swift 4.2 and Swift 5.0 --- .circleci/config.yml | 66 +++++++++++++++++++++----------------------- Gemfile | 2 +- Gemfile.lock | 26 ++++++++--------- Swiftilities.podspec | 4 +-- 4 files changed, 47 insertions(+), 51 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 546e2df..56b5d2a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,42 +1,22 @@ -version: 2 +version: 2.1 jobs: test: - macos: - xcode: "10.2.0" - environment: - LC_ALL: en_US.UTF-8 - LANG: en_US.UTF-8 - shell: /bin/bash --login -eo pipefail + executor: xcode-10 steps: - - run: - name: Set Ruby Version - command: echo "ruby-2.5" > ~/.ruby-version - - checkout - - run: - name: Install CocoaPods Specs Repo - command: | - curl https://cocoapods-specs.circleci.com/fetch-cocoapods-repo-from-s3.sh | bash -s cf - - run: bundle install + - setup - run: name: Fastlane Test command: | cd Example bundle exec fastlane test - - run: bundle exec pod lib lint + - run: bundle exec pod lib lint --swift-version=4.2 + - run: bundle exec pod lib lint --swift-version=5.0 carthage-build: - macos: - xcode: "10.2.0" - environment: - LC_ALL: en_US.UTF-8 - LANG: en_US.UTF-8 - shell: /bin/bash --login -eo pipefail + executor: xcode-10 steps: - - run: - name: Set Ruby Version - command: echo "ruby-2.5" > ~/.ruby-version - - checkout + - setup - run: name: Update homebrew dependencies command: brew update 1> /dev/null 2> /dev/null @@ -48,24 +28,40 @@ jobs: command: carthage build --no-skip-current && test -d Carthage/Build/iOS/Swiftilities.framework deploy-to-cocoapods: + executor: xcode-10 + steps: + - setup + - run: bundle exec pod trunk push + +executors: + xcode-10: macos: xcode: "10.2.0" environment: LC_ALL: en_US.UTF-8 LANG: en_US.UTF-8 shell: /bin/bash --login -eo pipefail + +commands: + setup: + description: "Shared setup" + steps: + - checkout + - restore-gems + + restore-gems: + description: "Restore Ruby Gems" steps: - run: name: Set Ruby Version command: echo "ruby-2.5" > ~/.ruby-version - - checkout - - run: - name: Install CocoaPods Specs Repo - command: | - curl https://cocoapods-specs.circleci.com/fetch-cocoapods-repo-from-s3.sh | bash -s cf - - run: bundle install - # Warnings must be ignored on CocoaPods 1.6.1 https://github.com/CocoaPods/CocoaPods/issues/8635 - - run: bundle exec pod trunk push --allow-warnings + - restore_cache: + key: 1-gems-{{ checksum "Gemfile.lock" }} + - run: bundle check || bundle install --path vendor/bundle + - save_cache: + key: 1-gems-{{ checksum "Gemfile.lock" }} + paths: + - vendor/bundle workflows: version: 2 diff --git a/Gemfile b/Gemfile index 2e5b947..04632ab 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,5 @@ source "https://rubygems.org" -gem 'cocoapods', '~> 1.6.1' +gem 'cocoapods', '1.7.0.rc.1' gem 'xcpretty' gem 'fastlane' diff --git a/Gemfile.lock b/Gemfile.lock index 4505726..3c69e8c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -12,11 +12,11 @@ GEM atomos (0.1.3) babosa (1.0.2) claide (1.0.2) - cocoapods (1.6.1) + cocoapods (1.7.0.rc.1) activesupport (>= 4.0.2, < 5) claide (>= 1.0.2, < 2.0) - cocoapods-core (= 1.6.1) - cocoapods-deintegrate (>= 1.0.2, < 2.0) + cocoapods-core (= 1.7.0.rc.1) + cocoapods-deintegrate (>= 1.0.3, < 2.0) cocoapods-downloader (>= 1.2.2, < 2.0) cocoapods-plugins (>= 1.0.0, < 2.0) cocoapods-search (>= 1.0.0, < 2.0) @@ -30,8 +30,8 @@ GEM molinillo (~> 0.6.6) nap (~> 1.0) ruby-macho (~> 1.4) - xcodeproj (>= 1.8.1, < 2.0) - cocoapods-core (1.6.1) + xcodeproj (>= 1.8.2, < 2.0) + cocoapods-core (1.7.0.rc.1) activesupport (>= 4.0.2, < 6) fuzzy_match (~> 2.0.4) nap (~> 1.0) @@ -58,7 +58,7 @@ GEM dotenv (2.7.2) emoji_regex (1.0.1) escape (0.0.4) - excon (0.62.0) + excon (0.64.0) faraday (0.15.4) multipart-post (>= 1.2, < 3) faraday-cookie_jar (0.0.6) @@ -67,7 +67,7 @@ GEM faraday_middleware (0.13.1) faraday (>= 0.7.4, < 1.0) fastimage (2.1.5) - fastlane (2.120.0) + fastlane (2.123.0) CFPropertyList (>= 2.3, < 4.0.0) addressable (>= 2.3, < 3.0.0) babosa (>= 1.0.2, < 2.0.0) @@ -153,7 +153,7 @@ GEM nap (1.1.0) naturally (2.2.0) netrc (0.11.0) - os (1.0.0) + os (1.0.1) plist (3.5.0) public_suffix (2.0.5) representable (3.0.4) @@ -179,7 +179,7 @@ GEM unicode-display_width (~> 1.1, >= 1.1.1) thread_safe (0.3.6) tty-cursor (0.6.1) - tty-screen (0.6.5) + tty-screen (0.7.0) tty-spinner (0.9.0) tty-cursor (~> 0.6.0) tzinfo (1.2.5) @@ -187,10 +187,10 @@ GEM uber (0.1.0) unf (0.1.4) unf_ext - unf_ext (0.0.7.5) - unicode-display_width (1.5.0) + unf_ext (0.0.7.6) + unicode-display_width (1.6.0) word_wrap (1.0.0) - xcodeproj (1.8.2) + xcodeproj (1.9.0) CFPropertyList (>= 2.3.3, < 4.0) atomos (~> 0.1.3) claide (>= 1.0.2, < 2.0) @@ -205,7 +205,7 @@ PLATFORMS ruby DEPENDENCIES - cocoapods (~> 1.6.1) + cocoapods (= 1.7.0.rc.1) fastlane xcpretty diff --git a/Swiftilities.podspec b/Swiftilities.podspec index e165087..2b24aab 100644 --- a/Swiftilities.podspec +++ b/Swiftilities.podspec @@ -1,8 +1,8 @@ Pod::Spec.new do |s| s.name = "Swiftilities" - s.version = "0.23.0" + s.version = "0.23.1" s.summary = "A collection of useful Swift utilities." - s.swift_version = '5.0' + s.swift_versions = ['4.2', '5.0'] s.description = <<-DESC A collection of useful Swift utilities. All components and From d82b24952a93be0bbbbf0441721e398091583ecb Mon Sep 17 00:00:00 2001 From: Chris Ballinger Date: Tue, 21 May 2019 12:23:32 -0700 Subject: [PATCH 04/12] Revert minor version bump --- Swiftilities.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Swiftilities.podspec b/Swiftilities.podspec index 2b24aab..11dfde8 100644 --- a/Swiftilities.podspec +++ b/Swiftilities.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "Swiftilities" - s.version = "0.23.1" + s.version = "0.23.0" s.summary = "A collection of useful Swift utilities." s.swift_versions = ['4.2', '5.0'] From 40903aaea4eb24df0db2224b50440c7a6fcc9f56 Mon Sep 17 00:00:00 2001 From: Chris Ballinger Date: Tue, 21 May 2019 12:28:10 -0700 Subject: [PATCH 05/12] Use Xcode 10.2.1 --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 56b5d2a..874df67 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -36,7 +36,7 @@ jobs: executors: xcode-10: macos: - xcode: "10.2.0" + xcode: "10.2.1" environment: LC_ALL: en_US.UTF-8 LANG: en_US.UTF-8 From 387b636ff30dd0743e841c174523bf5e5605f4e8 Mon Sep 17 00:00:00 2001 From: Chris Ballinger Date: Tue, 21 May 2019 12:37:26 -0700 Subject: [PATCH 06/12] Testing Specs CDN --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 874df67..6d16197 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,6 +10,7 @@ jobs: command: | cd Example bundle exec fastlane test + - run: bundle exec pod repo add-cdn jsDelivr-Specs "https://cdn.jsdelivr.net/cocoa/" - run: bundle exec pod lib lint --swift-version=4.2 - run: bundle exec pod lib lint --swift-version=5.0 From cb9afb88eca2d594812303d9e3f0c9d7d415be40 Mon Sep 17 00:00:00 2001 From: Chris Ballinger Date: Tue, 21 May 2019 12:41:34 -0700 Subject: [PATCH 07/12] Rename CDN --- .circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6d16197..d48c9b9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,14 +5,14 @@ jobs: executor: xcode-10 steps: - setup + - run: bundle exec pod repo add-cdn master "https://cdn.jsdelivr.net/cocoa/" + - run: bundle exec pod lib lint --swift-version=4.2 + - run: bundle exec pod lib lint --swift-version=5.0 - run: name: Fastlane Test command: | cd Example bundle exec fastlane test - - run: bundle exec pod repo add-cdn jsDelivr-Specs "https://cdn.jsdelivr.net/cocoa/" - - run: bundle exec pod lib lint --swift-version=4.2 - - run: bundle exec pod lib lint --swift-version=5.0 carthage-build: executor: xcode-10 From 5b98b456393147cd5300a22ba59814dca2b70f3a Mon Sep 17 00:00:00 2001 From: Chris Ballinger Date: Tue, 21 May 2019 12:46:33 -0700 Subject: [PATCH 08/12] Fixing CDN --- .circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d48c9b9..e484b09 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,9 +5,9 @@ jobs: executor: xcode-10 steps: - setup - - run: bundle exec pod repo add-cdn master "https://cdn.jsdelivr.net/cocoa/" - - run: bundle exec pod lib lint --swift-version=4.2 - - run: bundle exec pod lib lint --swift-version=5.0 + - run: bundle exec pod repo add-cdn jsDelivr-Specs "https://cdn.jsdelivr.net/cocoa/" + - run: bundle exec pod lib lint --swift-version=4.2 --sources=jsDelivr-Specs + - run: bundle exec pod lib lint --swift-version=5.0 --sources=jsDelivr-Specs - run: name: Fastlane Test command: | From 602c351fd1643f13d7cd71affaef428cd8d74d0d Mon Sep 17 00:00:00 2001 From: Chris Ballinger Date: Tue, 21 May 2019 12:50:35 -0700 Subject: [PATCH 09/12] Add back S3 repo for trunk push --- .circleci/config.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index e484b09..e77aca7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -32,6 +32,10 @@ jobs: executor: xcode-10 steps: - setup + - run: + name: Fetch CocoaPods Specs + command: | + curl https://cocoapods-specs.circleci.com/fetch-cocoapods-repo-from-s3.sh | bash -s cf - run: bundle exec pod trunk push executors: From 9cee92bad015c3af145039f7ec3e12048a06c2d1 Mon Sep 17 00:00:00 2001 From: Chris Ballinger Date: Tue, 21 May 2019 13:51:46 -0700 Subject: [PATCH 10/12] Use rc2 --- Gemfile | 2 +- Gemfile.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Gemfile b/Gemfile index 04632ab..14adbd6 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,5 @@ source "https://rubygems.org" -gem 'cocoapods', '1.7.0.rc.1' +gem 'cocoapods', '1.7.0.rc.2' gem 'xcpretty' gem 'fastlane' diff --git a/Gemfile.lock b/Gemfile.lock index 3c69e8c..dcb5c45 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -12,10 +12,10 @@ GEM atomos (0.1.3) babosa (1.0.2) claide (1.0.2) - cocoapods (1.7.0.rc.1) + cocoapods (1.7.0.rc.2) activesupport (>= 4.0.2, < 5) claide (>= 1.0.2, < 2.0) - cocoapods-core (= 1.7.0.rc.1) + cocoapods-core (= 1.7.0.rc.2) cocoapods-deintegrate (>= 1.0.3, < 2.0) cocoapods-downloader (>= 1.2.2, < 2.0) cocoapods-plugins (>= 1.0.0, < 2.0) @@ -31,7 +31,7 @@ GEM nap (~> 1.0) ruby-macho (~> 1.4) xcodeproj (>= 1.8.2, < 2.0) - cocoapods-core (1.7.0.rc.1) + cocoapods-core (1.7.0.rc.2) activesupport (>= 4.0.2, < 6) fuzzy_match (~> 2.0.4) nap (~> 1.0) @@ -205,7 +205,7 @@ PLATFORMS ruby DEPENDENCIES - cocoapods (= 1.7.0.rc.1) + cocoapods (= 1.7.0.rc.2) fastlane xcpretty From 36de18f50966e809f0efc8621e90972577da8a9a Mon Sep 17 00:00:00 2001 From: Chris Ballinger Date: Tue, 21 May 2019 16:36:57 -0700 Subject: [PATCH 11/12] Fix podspec linting issue --- Swiftilities.podspec | 150 +++++++++++++++++++++++++------------------ 1 file changed, 87 insertions(+), 63 deletions(-) diff --git a/Swiftilities.podspec b/Swiftilities.podspec index 11dfde8..b1a2609 100644 --- a/Swiftilities.podspec +++ b/Swiftilities.podspec @@ -15,23 +15,32 @@ Pod::Spec.new do |s| s.author = { "Nicholas Bonatsakis" => "nick.bonatsakis@raizlabs.com" } s.source = { :git => "https://github.com/rightpoint/Swiftilities.git", :tag => s.version.to_s } - s.platform = :ios, '9.0' + s.ios.deployment_target = '9.0' + s.osx.deployment_target = '10.11' + s.watchos.deployment_target = '2.2' + s.tvos.deployment_target = '10.0' + s.requires_arc = true s.default_subspec = 'All' + s.ios.framework = 'UIKit' + s.tvos.framework = 'UIKit' + # About s.subspec "AboutView" do |ss| - ss.source_files = "Pod/Classes/AboutView/*.swift" - ss.frameworks = ["UIKit"] + ss.ios.source_files = "Pod/Classes/AboutView/*.swift" + ss.ios.deployment_target = '9.0' + ss.ios.frameworks = ['UIKit', 'MessageUI'] end # AccessibilityHelpers s.subspec "AccessibilityHelpers" do |ss| ss.source_files = "Pod/Classes/AccessibilityHelpers/*.swift" - ss.frameworks = ["UIKit"] + ss.ios.deployment_target = '9.0' + ss.tvos.deployment_target = '10.0' end # Acknowledgements @@ -40,8 +49,8 @@ Pod::Spec.new do |s| ss.dependency 'Swiftilities/LicenseFormatter' ss.dependency 'Swiftilities/Deselection' ss.dependency 'Swiftilities/Compatibility' - ss.source_files = "Pod/Classes/Acknowledgements/*.swift" - ss.frameworks = ["UIKit"] + ss.ios.source_files = "Pod/Classes/Acknowledgements/*.swift" + ss.ios.deployment_target = '9.0' end # BetterButton @@ -52,14 +61,16 @@ Pod::Spec.new do |s| ss.dependency 'Swiftilities/ImageHelpers' ss.dependency 'Swiftilities/ColorHelpers' ss.dependency 'Swiftilities/Math' - ss.frameworks = ["UIKit"] + ss.ios.deployment_target = '9.0' + ss.tvos.deployment_target = '10.0' end # ColorHelpers s.subspec "ColorHelpers" do |ss| ss.source_files = "Pod/Classes/ColorHelpers/*.swift" - ss.frameworks = ["UIKit"] + ss.ios.deployment_target = '9.0' + ss.tvos.deployment_target = '10.0' end # Compatibility @@ -79,54 +90,58 @@ Pod::Spec.new do |s| s.subspec "Deselection" do |ss| ss.source_files = "Pod/Classes/Deselection/*.swift" - ss.frameworks = ["UIKit"] + ss.ios.deployment_target = '9.0' + ss.tvos.deployment_target = '10.0' end # DeviceSize s.subspec "DeviceSize" do |ss| - ss.source_files = "Pod/Classes/DeviceSize/*.swift" - ss.frameworks = ["UIKit"] + ss.ios.source_files = "Pod/Classes/DeviceSize/*.swift" + ss.ios.deployment_target = '9.0' end # FormattedTextField s.subspec "FormattedTextField" do |ss| ss.source_files = "Pod/Classes/FormattedTextField/*.swift" - ss.frameworks = ["UIKit"] + ss.ios.deployment_target = '9.0' + ss.tvos.deployment_target = '10.0' end # Forms s.subspec "Forms" do |ss| ss.source_files = "Pod/Classes/Forms/*.swift" - ss.frameworks = ["UIKit"] + ss.ios.deployment_target = '9.0' + ss.tvos.deployment_target = '10.0' end # HairlineView s.subspec "HairlineView" do |ss| ss.source_files = "Pod/Classes/HairlineView/*.swift" - ss.frameworks = ["UIKit"] + ss.ios.deployment_target = '9.0' + ss.tvos.deployment_target = '10.0' end s.subspec "ImageHelpers" do |ss| ss.source_files = "Pod/Classes/ImageHelpers/*.swift" - ss.frameworks = ["UIKit"] + ss.ios.deployment_target = '9.0' + ss.tvos.deployment_target = '10.0' end # Keyboard s.subspec "Keyboard" do |ss| - ss.source_files = "Pod/Classes/Keyboard/*.swift" - ss.frameworks = ["UIKit"] + ss.ios.source_files = "Pod/Classes/Keyboard/*.swift" + ss.ios.deployment_target = '9.0' end # LicenseFormatter s.subspec "LicenseFormatter" do |ss| ss.source_files = "Pod/Classes/LicenseFormatter/*.swift" - ss.frameworks = "Foundation" end # Lifecycle @@ -134,102 +149,111 @@ Pod::Spec.new do |s| s.subspec "Lifecycle" do |ss| ss.dependency 'Swiftilities/Math' ss.dependency 'Swiftilities/HairlineView' - ss.source_files = ["Pod/Classes/Lifecycle/**/*.swift"] - ss.frameworks = ["UIKit"] + ss.ios.source_files = ["Pod/Classes/Lifecycle/**/*.swift"] + ss.ios.deployment_target = '9.0' + ss.tvos.deployment_target = '10.0' end # Logging s.subspec "Logging" do |ss| ss.source_files = "Pod/Classes/Logging/*.swift" - ss.frameworks = "Foundation" end # Math s.subspec "Math" do |ss| - ss.ios.deployment_target = '9.0' - ss.ios.source_files = "Pod/Classes/Math/*.swift" - - ss.tvos.deployment_target = '9.0' - ss.tvos.source_files = "Pod/Classes/Math/*.swift" - - ss.osx.deployment_target = '10.11' - ss.osx.source_files = "Pod/Classes/Math/*.swift" - - ss.watchos.deployment_target = '2.2' - ss.watchos.source_files = "Pod/Classes/Math/*.swift" + ss.source_files = "Pod/Classes/Math/*.swift" + ss.frameworks = ["CoreGraphics"] end # RootViewController s.subspec "RootViewController" do |ss| - ss.source_files = "Pod/Classes/RootViewController/*.swift" - ss.frameworks = ["UIKit", "MessageUI"] + ss.ios.source_files = "Pod/Classes/RootViewController/*.swift" + ss.ios.frameworks = ["UIKit", "MessageUI"] + ss.ios.deployment_target = '9.0' end # Shapes s.subspec "Shapes" do |ss| ss.source_files = "Pod/Classes/Shapes/*.swift" - ss.frameworks = ["UIKit"] + ss.ios.deployment_target = '9.0' + ss.tvos.deployment_target = '10.0' end # StackViewHelpers s.subspec "StackViewHelpers" do |ss| ss.source_files = "Pod/Classes/StackViewHelpers/*.swift" - ss.frameworks = ["UIKit"] + ss.ios.deployment_target = '9.0' + ss.tvos.deployment_target = '10.0' end # TableViewHelpers s.subspec "TableViewHelpers" do |ss| ss.source_files = "Pod/Classes/TableViewHelpers/*.swift" - ss.frameworks = ["UIKit"] + ss.ios.deployment_target = '9.0' + ss.tvos.deployment_target = '10.0' end # TintedButton s.subspec "TintedButton" do |ss| ss.source_files = "Pod/Classes/TintedButton/*.swift" - ss.frameworks = ["UIKit"] + ss.ios.deployment_target = '9.0' + ss.tvos.deployment_target = '10.0' end # Views s.subspec "Views" do |ss| ss.source_files = ["Pod/Classes/Views/**/*.swift"] - ss.frameworks = ["UIKit"] + ss.ios.deployment_target = '9.0' end # Catch All s.subspec "All" do |ss| - ss.dependency 'Swiftilities/AboutView' - ss.dependency 'Swiftilities/AccessibilityHelpers' - ss.dependency 'Swiftilities/Acknowledgements' - ss.dependency 'Swiftilities/BetterButton' - ss.dependency 'Swiftilities/ColorHelpers' - ss.dependency 'Swiftilities/Compatibility' - ss.dependency 'Swiftilities/CoreDataStack' - ss.dependency 'Swiftilities/Deselection' - ss.dependency 'Swiftilities/DeviceSize' - ss.dependency 'Swiftilities/FormattedTextField' - ss.dependency 'Swiftilities/Forms' - ss.dependency 'Swiftilities/HairlineView' - ss.dependency 'Swiftilities/ImageHelpers' - ss.dependency 'Swiftilities/Keyboard' - ss.dependency 'Swiftilities/LicenseFormatter' - ss.dependency 'Swiftilities/Lifecycle' - ss.dependency 'Swiftilities/Logging' - ss.dependency 'Swiftilities/Math' - ss.dependency 'Swiftilities/RootViewController' - ss.dependency 'Swiftilities/Shapes' - ss.dependency 'Swiftilities/StackViewHelpers' - ss.dependency 'Swiftilities/TableViewHelpers' - ss.dependency 'Swiftilities/TintedButton' - ss.dependency 'Swiftilities/Views' + ss.ios.dependency 'Swiftilities/AboutView' + ss.ios.dependency 'Swiftilities/AccessibilityHelpers' + ss.tvos.dependency 'Swiftilities/AccessibilityHelpers' + ss.ios.dependency 'Swiftilities/Acknowledgements' + ss.ios.dependency 'Swiftilities/BetterButton' + ss.tvos.dependency 'Swiftilities/BetterButton' + ss.ios.dependency 'Swiftilities/ColorHelpers' + ss.tvos.dependency 'Swiftilities/ColorHelpers' + ss.dependency 'Swiftilities/Compatibility' + ss.dependency 'Swiftilities/CoreDataStack' + ss.ios.dependency 'Swiftilities/Deselection' + ss.tvos.dependency 'Swiftilities/Deselection' + ss.ios.dependency 'Swiftilities/DeviceSize' + ss.ios.dependency 'Swiftilities/FormattedTextField' + ss.tvos.dependency 'Swiftilities/FormattedTextField' + ss.ios.dependency 'Swiftilities/Forms' + ss.tvos.dependency 'Swiftilities/Forms' + ss.ios.dependency 'Swiftilities/HairlineView' + ss.tvos.dependency 'Swiftilities/HairlineView' + ss.ios.dependency 'Swiftilities/ImageHelpers' + ss.tvos.dependency 'Swiftilities/ImageHelpers' + ss.ios.dependency 'Swiftilities/Keyboard' + ss.dependency 'Swiftilities/LicenseFormatter' + ss.ios.dependency 'Swiftilities/Lifecycle' + ss.tvos.dependency 'Swiftilities/Lifecycle' + ss.dependency 'Swiftilities/Logging' + ss.dependency 'Swiftilities/Math' + ss.ios.dependency 'Swiftilities/RootViewController' + ss.ios.dependency 'Swiftilities/Shapes' + ss.tvos.dependency 'Swiftilities/Shapes' + ss.ios.dependency 'Swiftilities/StackViewHelpers' + ss.tvos.dependency 'Swiftilities/StackViewHelpers' + ss.ios.dependency 'Swiftilities/TableViewHelpers' + ss.tvos.dependency 'Swiftilities/TableViewHelpers' + ss.ios.dependency 'Swiftilities/TintedButton' + ss.tvos.dependency 'Swiftilities/TintedButton' + ss.ios.dependency 'Swiftilities/Views' end end From 9b1f67854cfbab30dbf6d3ccc4d72b63332bcd31 Mon Sep 17 00:00:00 2001 From: Chris Ballinger Date: Wed, 22 May 2019 13:57:08 -0700 Subject: [PATCH 12/12] CocoaPods 1.7.0 --- Gemfile | 2 +- Gemfile.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Gemfile b/Gemfile index 14adbd6..d6e3fce 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,5 @@ source "https://rubygems.org" -gem 'cocoapods', '1.7.0.rc.2' +gem 'cocoapods', '~> 1.7.0' gem 'xcpretty' gem 'fastlane' diff --git a/Gemfile.lock b/Gemfile.lock index dcb5c45..37bb6ee 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -12,10 +12,10 @@ GEM atomos (0.1.3) babosa (1.0.2) claide (1.0.2) - cocoapods (1.7.0.rc.2) + cocoapods (1.7.0) activesupport (>= 4.0.2, < 5) claide (>= 1.0.2, < 2.0) - cocoapods-core (= 1.7.0.rc.2) + cocoapods-core (= 1.7.0) cocoapods-deintegrate (>= 1.0.3, < 2.0) cocoapods-downloader (>= 1.2.2, < 2.0) cocoapods-plugins (>= 1.0.0, < 2.0) @@ -31,7 +31,7 @@ GEM nap (~> 1.0) ruby-macho (~> 1.4) xcodeproj (>= 1.8.2, < 2.0) - cocoapods-core (1.7.0.rc.2) + cocoapods-core (1.7.0) activesupport (>= 4.0.2, < 6) fuzzy_match (~> 2.0.4) nap (~> 1.0) @@ -205,7 +205,7 @@ PLATFORMS ruby DEPENDENCIES - cocoapods (= 1.7.0.rc.2) + cocoapods (~> 1.7.0) fastlane xcpretty