From 2b3ae69cd5d980e7022975fe3d4822cedb7f89f0 Mon Sep 17 00:00:00 2001 From: Rui Peres Date: Thu, 18 Apr 2019 09:30:21 +0100 Subject: [PATCH] Update to use Swift 4.2 and Xcode 10.2 (#42) * Update to use Swift 4.2 and Xcode 10.2 * Updated Podspec and Podfile Locked all the dependencies to use Swift 4.2. * Update the Swift version in the different targets * Updated the actual example * Unsure why these weren't set. * There's hope. * Updated SPM file * Let's try something else * Trying a different approach * Revert "Trying a different approach" This reverts commit 1c16e1cff12fd00ce3ee35aa633bf243e95e3c0e. * This should fix this issue from carthage https://github.com/SwipeCellKit/SwipeCellKit/issues/297 --- .circleci/config.yml | 2 +- .swift-version | 2 +- Cartfile | 2 +- Cartfile.private | 6 ++-- Cartfile.resolved | 10 +++--- Example/AppDelegate.swift | 2 +- Gemfile | 2 +- Package.resolved | 16 ++++----- Package.swift | 4 +-- Podfile | 23 +++++++----- Podfile.lock | 33 ++++++++--------- ReactiveFeedback.podspec | 4 +-- ReactiveFeedback.xcodeproj/project.pbxproj | 35 +++++++++++-------- .../xcshareddata/xcschemes/Example.xcscheme | 2 +- 14 files changed, 76 insertions(+), 67 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 52dfa9f..fab9c01 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -47,7 +47,7 @@ references: jobs: build: macos: - xcode: "10.0.0" + xcode: "10.2.0" working_directory: /Users/distiller/project shell: /bin/bash --login -eo pipefail steps: diff --git a/.swift-version b/.swift-version index 5186d07..bf77d54 100644 --- a/.swift-version +++ b/.swift-version @@ -1 +1 @@ -4.0 +4.2 diff --git a/Cartfile b/Cartfile index f73f84f..e6233eb 100644 --- a/Cartfile +++ b/Cartfile @@ -1 +1 @@ -github "ReactiveCocoa/ReactiveSwift" ~> 4.0 +github "ReactiveCocoa/ReactiveSwift" ~> 5.0 diff --git a/Cartfile.private b/Cartfile.private index 87b4525..f806442 100644 --- a/Cartfile.private +++ b/Cartfile.private @@ -1,6 +1,6 @@ # Example app. -github "ReactiveCocoa/ReactiveCocoa" ~> 8.0 -github "onevcat/Kingfisher" ~> 4.0 +github "ReactiveCocoa/ReactiveCocoa" ~> 9.0.0 +github "onevcat/Kingfisher" ~> 5.2 # Tests -github "Quick/Nimble" ~> 7.0 +github "Quick/Nimble" ~> 8.0 diff --git a/Cartfile.resolved b/Cartfile.resolved index b3e73e9..867ad18 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,5 +1,5 @@ -github "Quick/Nimble" "v7.3.1" -github "ReactiveCocoa/ReactiveCocoa" "8.0.2" -github "ReactiveCocoa/ReactiveSwift" "4.0.0" -github "antitypical/Result" "4.0.0" -github "onevcat/Kingfisher" "4.10.0" +github "Quick/Nimble" "v8.0.1" +github "ReactiveCocoa/ReactiveCocoa" "9.0.0" +github "ReactiveCocoa/ReactiveSwift" "5.0.1" +github "antitypical/Result" "4.1.0" +github "onevcat/Kingfisher" "5.3.1" diff --git a/Example/AppDelegate.swift b/Example/AppDelegate.swift index 33ec939..e6bd194 100644 --- a/Example/AppDelegate.swift +++ b/Example/AppDelegate.swift @@ -13,7 +13,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { return true } } diff --git a/Gemfile b/Gemfile index 1f94518..cf7d8fb 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,4 @@ source 'https://rubygems.org' gem 'xcpretty' -gem 'cocoapods', '~> 1.5.0' +gem 'cocoapods', '~> 1.6.1' diff --git a/Package.resolved b/Package.resolved index f83f93d..91043b6 100644 --- a/Package.resolved +++ b/Package.resolved @@ -6,8 +6,8 @@ "repositoryURL": "https://github.com/Quick/Nimble.git", "state": { "branch": null, - "revision": "cd6dfb86f496fcd96ce0bc6da962cd936bf41903", - "version": "7.3.1" + "revision": "43304bf2b1579fd555f2fdd51742771c1e4f2b98", + "version": "8.0.1" } }, { @@ -15,8 +15,8 @@ "repositoryURL": "https://github.com/Quick/Quick.git", "state": { "branch": null, - "revision": "5fbf13871d185526993130c3a1fad0b70bfe37ce", - "version": "1.3.2" + "revision": "0b4ed6c706dd0cce923b5019a605a9bcc6b1b600", + "version": "2.0.0" } }, { @@ -24,8 +24,8 @@ "repositoryURL": "https://github.com/ReactiveCocoa/ReactiveSwift", "state": { "branch": null, - "revision": "4f6a12ae6762e825b0e19a4f7076eafa43847e6e", - "version": "4.0.0" + "revision": "c37950dc5020544c58d4bf47c0d028893686b9e6", + "version": "5.0.1" } }, { @@ -33,8 +33,8 @@ "repositoryURL": "https://github.com/antitypical/Result.git", "state": { "branch": null, - "revision": "8fc088dcf72802801efeecba76ea8fb041fb773d", - "version": "4.0.0" + "revision": "2ca499ba456795616fbc471561ff1d963e6ae160", + "version": "4.1.0" } } ] diff --git a/Package.swift b/Package.swift index 8ff620f..ac4a08f 100644 --- a/Package.swift +++ b/Package.swift @@ -7,8 +7,8 @@ let package = Package( .library(name: "ReactiveFeedback", targets: ["ReactiveFeedback"]), ], dependencies: [ - .package(url: "https://github.com/ReactiveCocoa/ReactiveSwift", from: "4.0.0"), - .package(url: "https://github.com/Quick/Nimble.git", from: "7.0.0"), + .package(url: "https://github.com/ReactiveCocoa/ReactiveSwift", from: "5.0.0"), + .package(url: "https://github.com/Quick/Nimble.git", from: "8.0.0"), ], targets: [ .target(name: "ReactiveFeedback", dependencies: ["ReactiveSwift"], path: "ReactiveFeedback"), diff --git a/Podfile b/Podfile index 5031327..3622c14 100644 --- a/Podfile +++ b/Podfile @@ -3,7 +3,13 @@ install! 'cocoapods', use_frameworks! def shared_pods - pod "ReactiveSwift", "~> 4.0" + pod "ReactiveSwift", "~> 5.0" +end + +target "Example" do + platform :ios, "8.0" + pod "Kingfisher" + shared_pods end target "ReactiveFeedback" do @@ -14,12 +20,13 @@ end target "ReactiveFeedbackTests" do platform :ios, "8.0" shared_pods - pod "Nimble", "~> 7.0" + pod "Nimble", "~> 8.0" end -target "Example" do - platform :ios, "10.0" - shared_pods - pod "Kingfisher", "~> 4.0" - pod "ReactiveCocoa", "~> 8.0" -end +post_install do |installer| + installer.pods_project.targets.each do |target| + target.build_configurations.each do |config| + config.build_settings['SWIFT_VERSION'] = '4.2' + end + end +end \ No newline at end of file diff --git a/Podfile.lock b/Podfile.lock index 836eb2c..f768df6 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -1,33 +1,28 @@ PODS: - - Kingfisher (4.1.0) - - Nimble (7.0.2) - - ReactiveCocoa (8.0.0): - - ReactiveSwift (~> 4.0) - - ReactiveSwift (4.0.0): - - Result (~> 4.0) - - Result (4.0.0) + - Kingfisher (4.10.1) + - Nimble (8.0.1) + - ReactiveSwift (5.0.1): + - Result (~> 4.1) + - Result (4.1.0) DEPENDENCIES: - - Kingfisher (~> 4.0) - - Nimble (~> 7.0) - - ReactiveCocoa (~> 8.0) - - ReactiveSwift (~> 4.0) + - Kingfisher + - Nimble (~> 8.0) + - ReactiveSwift (~> 5.0) SPEC REPOS: https://github.com/cocoapods/specs.git: - Kingfisher - Nimble - - ReactiveCocoa - ReactiveSwift - Result SPEC CHECKSUMS: - Kingfisher: f14df8cbe576bf55f211fa589e9869bceb4ea87d - Nimble: bfe1f814edabba69ff145cb1283e04ed636a67f2 - ReactiveCocoa: 87cb64d78424d749a0bbfd9b07e4825e8d834066 - ReactiveSwift: a2bb9ace428a109e9c0209615645d9d286c8c433 - Result: 7645bb3f50c2ce726dd0ff2fa7b6f42bbe6c3713 + Kingfisher: c148cd7b47ebde9989f6bc7c27dcaa79d81279a0 + Nimble: 45f786ae66faa9a709624227fae502db55a8bdd0 + ReactiveSwift: cac20a5bbe560c5806bd29c0fccf90d03b996ac1 + Result: bd966fac789cc6c1563440b348ab2598cc24d5c7 -PODFILE CHECKSUM: cb3e36c06f0aad276b3bae5804f78b4c467c2030 +PODFILE CHECKSUM: c48887843d650c5ab915d0ed50cb30912a276222 -COCOAPODS: 1.5.3 +COCOAPODS: 1.6.1 diff --git a/ReactiveFeedback.podspec b/ReactiveFeedback.podspec index a1ce3d7..d2aec64 100644 --- a/ReactiveFeedback.podspec +++ b/ReactiveFeedback.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "ReactiveFeedback" - s.version = "0.5.0" + s.version = "0.6.0" s.summary = "Unidirectional reactive architecture" s.description = <<-DESC @@ -18,5 +18,5 @@ Pod::Spec.new do |s| s.source = { :git => "https://github.com/Babylonpartners/ReactiveFeedback.git", :tag => "#{s.version}" } s.source_files = "ReactiveFeedback/*.{swift}" - s.dependency "ReactiveSwift", "~> 4.0" + s.dependency "ReactiveSwift", "~> 5.0" end diff --git a/ReactiveFeedback.xcodeproj/project.pbxproj b/ReactiveFeedback.xcodeproj/project.pbxproj index 18e4ce9..f6c6074 100644 --- a/ReactiveFeedback.xcodeproj/project.pbxproj +++ b/ReactiveFeedback.xcodeproj/project.pbxproj @@ -496,8 +496,12 @@ }; 25E1D21C1F5493D000D90192 = { CreatedOnToolsVersion = 8.3; + LastSwiftMigration = 1020; ProvisioningStyle = Automatic; }; + 65F8C25E218371A800924657 = { + LastSwiftMigration = 1020; + }; 9AE181B51F95A71B00A07551 = { CreatedOnToolsVersion = 9.0; }; @@ -508,6 +512,7 @@ developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, Base, ); @@ -707,7 +712,7 @@ PRODUCT_NAME = ReactiveFeedback; SDKROOT = macosx; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; @@ -727,7 +732,7 @@ PRODUCT_NAME = ReactiveFeedback; SDKROOT = macosx; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; @@ -791,6 +796,7 @@ SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.2; TVOS_DEPLOYMENT_TARGET = 9.0; }; name = Debug; @@ -845,6 +851,7 @@ MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 4.2; TVOS_DEPLOYMENT_TARGET = 9.0; VALIDATE_PRODUCT = YES; }; @@ -865,7 +872,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.babylonhealth.Example; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -884,7 +891,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.babylonhealth.Example; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Release; }; @@ -903,7 +910,7 @@ PRODUCT_NAME = ReactiveFeedback; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; @@ -924,7 +931,7 @@ PRODUCT_NAME = ReactiveFeedback; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; @@ -944,7 +951,7 @@ PRODUCT_NAME = ReactiveFeedback; SDKROOT = appletvos; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; @@ -964,7 +971,7 @@ PRODUCT_NAME = ReactiveFeedback; SDKROOT = appletvos; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; @@ -984,7 +991,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.babylonhealth.ReactiveFeedbackTests; PRODUCT_NAME = ReactiveFeedbackTests; SDKROOT = iphoneos; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -1002,7 +1009,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.babylonhealth.ReactiveFeedbackTests; PRODUCT_NAME = ReactiveFeedbackTests; SDKROOT = iphoneos; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Release; }; @@ -1020,7 +1027,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.babylonhealth.ReactiveFeedbackTests; PRODUCT_NAME = ReactiveFeedbackTests; SDKROOT = iphoneos; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -1038,7 +1045,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.babylonhealth.ReactiveFeedbackTests; PRODUCT_NAME = ReactiveFeedbackTests; SDKROOT = iphoneos; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Release; }; @@ -1056,7 +1063,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.babylonhealth.ReactiveFeedbackTests; PRODUCT_NAME = ReactiveFeedbackTests; SDKROOT = macosx; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -1074,7 +1081,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.babylonhealth.ReactiveFeedbackTests; PRODUCT_NAME = ReactiveFeedbackTests; SDKROOT = macosx; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Release; }; diff --git a/ReactiveFeedback.xcodeproj/xcshareddata/xcschemes/Example.xcscheme b/ReactiveFeedback.xcodeproj/xcshareddata/xcschemes/Example.xcscheme index 8c4d85b..defa50a 100644 --- a/ReactiveFeedback.xcodeproj/xcshareddata/xcschemes/Example.xcscheme +++ b/ReactiveFeedback.xcodeproj/xcshareddata/xcschemes/Example.xcscheme @@ -80,7 +80,7 @@ buildForTesting = "YES" buildForRunning = "YES" buildForProfiling = "YES" - buildForArchiving = "YES" + buildForArchiving = "NO" buildForAnalyzing = "YES">