Skip to content

Commit 8d34d05

Browse files
authored
[chore]: bump minimum deployment & swift versions (#186)
- bump minimum iOS deployment target to 14.0 - bump swift version to 5.7 - remove an unneeded config in our gemfile - bump xcode version in CI configs to 14.2.0 - bump simulator target in CI configs to 16.2 - add `ENABLE_TESTING_SEARCH_PATHS` to WorkflowTesting podspec to resolve search path issues induced by deployment target change - remove `VERSION` file in favor of `version.rb`, and standardize version references
1 parent f924e81 commit 8d34d05

35 files changed

+142
-151
lines changed

.github/workflows/swift.yaml

+6-6
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ jobs:
4141
bundle exec pod gen Development.podspec
4242
4343
- name: Switch Xcode
44-
run: sudo xcode-select -s /Applications/Xcode_13.3.1.app
44+
run: sudo xcode-select -s /Applications/Xcode_14.2.0.app
4545

4646
- name: Build & Test
4747
run: |
48-
set -o pipefail && xcodebuild -workspace gen/Development/Development.xcworkspace -scheme ${{ matrix.scheme }} -destination platform\=iOS\ Simulator,OS\=15.4,name\=iPad\ Pro\ \(9.7-inch\) build test | xcpretty
48+
set -o pipefail && xcodebuild -workspace gen/Development/Development.xcworkspace -scheme ${{ matrix.scheme }} -destination platform\=iOS\ Simulator,OS\=16.2,name\=iPad\ Pro\ \(9.7-inch\) build test | xcpretty
4949
5050
spm:
5151
runs-on: macos-latest
@@ -54,7 +54,7 @@ jobs:
5454
- uses: actions/checkout@v3
5555

5656
- name: Switch Xcode
57-
run: sudo xcode-select -s /Applications/Xcode_13.3.1.app
57+
run: sudo xcode-select -s /Applications/Xcode_14.2.0.app
5858

5959
- name: Swift Package Manager - iOS
6060
run: |
@@ -81,13 +81,13 @@ jobs:
8181
bundle check || bundle install --path .bundle
8282
8383
- name: Switch Xcode
84-
run: sudo xcode-select -s /Applications/Xcode_13.3.1.app
84+
run: sudo xcode-select -s /Applications/Xcode_14.2.0.app
8585

8686
- name: Tutorial App
8787
run: |
8888
cd Samples/Tutorial
8989
bundle exec pod install
90-
set -o pipefail && xcodebuild -workspace Tutorial.xcworkspace -scheme Tutorial -destination platform\=iOS\ Simulator,OS\=15.4,name\=iPad\ Pro\ \(9.7-inch\) build test | xcpretty
90+
set -o pipefail && xcodebuild -workspace Tutorial.xcworkspace -scheme Tutorial -destination platform\=iOS\ Simulator,OS\=16.2,name\=iPad\ Pro\ \(9.7-inch\) build test | xcpretty
9191
9292
documentation-lint:
9393
runs-on: macos-latest
@@ -107,7 +107,7 @@ jobs:
107107
brew install sourcedocs
108108
109109
- name: Switch Xcode
110-
run: sudo xcode-select -s /Applications/Xcode_13.3.1.app
110+
run: sudo xcode-select -s /Applications/Xcode_14.2.0.app
111111

112112
- name: Swiftdocs
113113
run: |

Development.podspec

+54-57
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
require_relative('version')
2+
13
Pod::Spec.new do |s|
24
s.name = 'Development'
35
s.version = '0.1.0'
@@ -7,14 +9,14 @@ Pod::Spec.new do |s|
79
s.author = 'Square'
810
s.source = { :git => 'https://github.com/square/workflow-swift.git', :tag => "v#{s.version}" }
911

10-
s.ios.deployment_target = '11.0'
11-
s.swift_version = '5.0'
12+
s.ios.deployment_target = WORKFLOW_IOS_DEPLOYMENT_TARGET
13+
s.swift_version = WORKFLOW_SWIFT_VERSION
1214
s.dependency 'Workflow'
1315
s.dependency 'WorkflowUI'
1416
s.dependency 'WorkflowReactiveSwift'
1517
s.dependency 'WorkflowRxSwift'
16-
# s.dependency 'WorkflowCombine' # TODO: Disabled because app specs cannot increase the deployment target of the root
17-
# s.dependency 'WorkflowConcurrency' # TODO: Disabled because app specs cannot increase the deployment target of the root
18+
s.dependency 'WorkflowCombine'
19+
s.dependency 'WorkflowConcurrency'
1820
s.dependency 'ViewEnvironment'
1921

2022
s.source_files = 'Samples/Dummy.swift'
@@ -45,17 +47,14 @@ Pod::Spec.new do |s|
4547
test_spec.source_files = 'WorkflowTesting/Tests/**/*.swift'
4648
end
4749

48-
# TODO: Disabled because app specs cannot increase the deployment target of the root
49-
# To use, increase the deployment target of this spec to 13.0 or higher
50-
#
51-
# s.app_spec 'SampleSwiftUIApp' do |app_spec|
52-
# app_spec.ios.deployment_target = '13.0'
53-
# app_spec.dependency 'WorkflowSwiftUI'
54-
# app_spec.pod_target_xcconfig = {
55-
# 'IFNFOPLIST_FILE' => '${PODS_ROOT}/../Samples/SampleSwiftUIApp/SampleSwiftUIApp/Configuration/Info.plist'
56-
# }
57-
# app_spec.source_files = 'SampleSwiftUIApp/SampleSwiftUIApp/**/*.swift'
58-
# end
50+
s.app_spec 'SampleSwiftUIApp' do |app_spec|
51+
app_spec.ios.deployment_target = WORKFLOW_IOS_DEPLOYMENT_TARGET
52+
app_spec.dependency 'WorkflowSwiftUI'
53+
app_spec.pod_target_xcconfig = {
54+
'IFNFOPLIST_FILE' => '${PODS_ROOT}/../Samples/SampleSwiftUIApp/SampleSwiftUIApp/Configuration/Info.plist'
55+
}
56+
app_spec.source_files = 'Samples/SampleSwiftUIApp/SampleSwiftUIApp/**/*.swift'
57+
end
5958

6059
s.app_spec 'SampleTicTacToe' do |app_spec|
6160
app_spec.source_files = 'Samples/TicTacToe/Sources/**/*.swift'
@@ -146,48 +145,46 @@ Pod::Spec.new do |s|
146145
test_spec.dependency 'WorkflowRxSwiftTesting'
147146
end
148147

149-
# TODO: Disabled because app specs cannot increase the deployment target of the root
150-
# To use, increase the deployment target of this spec to 13.0 or higher
151-
# s.app_spec 'WorkflowCombineSampleApp' do |app_spec|
152-
# app_spec.source_files = 'Samples/WorkflowCombineSampleApp/WorkflowCombineSampleApp/**/*.swift'
153-
# end
154-
#
155-
# s.test_spec 'WorkflowCombineSampleAppTests' do |test_spec|
156-
# test_spec.dependency 'Development/WorkflowCombineSampleApp'
157-
# test_spec.dependency 'WorkflowTesting'
158-
# test_spec.requires_app_host = true
159-
# test_spec.app_host_name = 'Development/WorkflowCombineSampleApp'
160-
# test_spec.source_files = 'Samples/WorkflowCombineSampleApp/WorkflowCombineSampleAppUnitTests/**/*.swift'
161-
# end
162-
163-
# s.test_spec 'WorkflowCombineTests' do |test_spec|
164-
# test_spec.requires_app_host = true
165-
# test_spec.source_files = 'WorkflowCombine/Tests/**/*.swift'
166-
# test_spec.framework = 'XCTest'
167-
# test_spec.dependency 'WorkflowTesting'
168-
# test_spec.dependency 'WorkflowCombineTesting'
169-
# end
170-
171-
# s.test_spec 'WorkflowCombineTestingTests' do |test_spec|
172-
# test_spec.requires_app_host = true
173-
# test_spec.source_files = 'WorkflowCombine/TestingTests/**/*.swift'
174-
# test_spec.framework = 'XCTest'
175-
# test_spec.dependency 'WorkflowTesting'
176-
# test_spec.dependency 'WorkflowCombineTesting'
177-
# end
148+
s.app_spec 'WorkflowCombineSampleApp' do |app_spec|
149+
app_spec.source_files = 'Samples/WorkflowCombineSampleApp/WorkflowCombineSampleApp/**/*.swift'
150+
end
151+
152+
s.test_spec 'WorkflowCombineSampleAppTests' do |test_spec|
153+
test_spec.dependency 'Development/WorkflowCombineSampleApp'
154+
test_spec.dependency 'WorkflowTesting'
155+
test_spec.requires_app_host = true
156+
test_spec.app_host_name = 'Development/WorkflowCombineSampleApp'
157+
test_spec.source_files = 'Samples/WorkflowCombineSampleApp/WorkflowCombineSampleAppUnitTests/**/*.swift'
158+
end
159+
160+
s.test_spec 'WorkflowCombineTests' do |test_spec|
161+
test_spec.requires_app_host = true
162+
test_spec.source_files = 'WorkflowCombine/Tests/**/*.swift'
163+
test_spec.framework = 'XCTest'
164+
test_spec.dependency 'WorkflowTesting'
165+
test_spec.dependency 'WorkflowCombineTesting'
166+
end
167+
168+
s.test_spec 'WorkflowCombineTestingTests' do |test_spec|
169+
test_spec.requires_app_host = true
170+
test_spec.source_files = 'WorkflowCombine/TestingTests/**/*.swift'
171+
test_spec.framework = 'XCTest'
172+
test_spec.dependency 'WorkflowTesting'
173+
test_spec.dependency 'WorkflowCombineTesting'
174+
end
178175

179-
# s.test_spec 'WorkflowConcurrencyTests' do |test_spec|
180-
# test_spec.requires_app_host = true
181-
# test_spec.source_files = 'WorkflowConcurrency/Tests/**/*.swift'
182-
# test_spec.framework = 'XCTest'
183-
# test_spec.dependency 'WorkflowTesting'
184-
# end
176+
s.test_spec 'WorkflowConcurrencyTests' do |test_spec|
177+
test_spec.requires_app_host = true
178+
test_spec.source_files = 'WorkflowConcurrency/Tests/**/*.swift'
179+
test_spec.framework = 'XCTest'
180+
test_spec.dependency 'WorkflowTesting'
181+
end
185182

186-
# s.test_spec 'WorkflowConcurrencyTestingTests' do |test_spec|
187-
# test_spec.requires_app_host = true
188-
# test_spec.source_files = 'WorkflowConcurrency/TestingTests/**/*.swift'
189-
# test_spec.framework = 'XCTest'
190-
# test_spec.dependency 'WorkflowTesting'
191-
# test_spec.dependency 'WorkflowConcurrencyTesting'
192-
# end
183+
s.test_spec 'WorkflowConcurrencyTestingTests' do |test_spec|
184+
test_spec.requires_app_host = true
185+
test_spec.source_files = 'WorkflowConcurrency/TestingTests/**/*.swift'
186+
test_spec.framework = 'XCTest'
187+
test_spec.dependency 'WorkflowTesting'
188+
test_spec.dependency 'WorkflowConcurrencyTesting'
189+
end
193190
end

Gemfile

-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,4 @@ source 'https://rubygems.org'
33
gem 'cocoapods-trunk', '>=1.6.0'
44
gem 'cocoapods'
55

6-
# Need it for Ruby 3.0 support and no release has happened yet
7-
gem 'cocoapods-disable-podfile-validations', :git => 'https://github.com/segiddins/cocoapods-disable-podfile-validations.git', :ref => '55598d677fa995be496a47b810f4f9dce732b169'
86
gem 'cocoapods-generate'

Gemfile.lock

+3-10
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
GIT
2-
remote: https://github.com/segiddins/cocoapods-disable-podfile-validations.git
3-
revision: 55598d677fa995be496a47b810f4f9dce732b169
4-
ref: 55598d677fa995be496a47b810f4f9dce732b169
5-
specs:
6-
cocoapods-disable-podfile-validations (0.1.1)
7-
81
GEM
92
remote: https://rubygems.org/
103
specs:
@@ -52,9 +45,10 @@ GEM
5245
public_suffix (~> 4.0)
5346
typhoeus (~> 1.0)
5447
cocoapods-deintegrate (1.0.5)
48+
cocoapods-disable-podfile-validations (0.2.0)
5549
cocoapods-downloader (1.6.3)
56-
cocoapods-generate (2.2.2)
57-
cocoapods-disable-podfile-validations (~> 0.1.1)
50+
cocoapods-generate (2.2.3)
51+
cocoapods-disable-podfile-validations (>= 0.1.1, < 0.3.0)
5852
cocoapods-plugins (1.0.0)
5953
nap
6054
cocoapods-search (1.0.1)
@@ -101,7 +95,6 @@ PLATFORMS
10195

10296
DEPENDENCIES
10397
cocoapods
104-
cocoapods-disable-podfile-validations!
10598
cocoapods-generate
10699
cocoapods-trunk (>= 1.6.0)
107100

Package.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
// swift-tools-version:5.2
1+
// swift-tools-version:5.7
22
// The swift-tools-version declares the minimum version of Swift required to build this package.
33

44
import PackageDescription
55

66
let package = Package(
77
name: "Workflow",
88
platforms: [
9-
.iOS("11.0"),
9+
.iOS("14.0"),
1010
.macOS("10.13"),
1111
],
1212
products: [
@@ -86,7 +86,7 @@ let package = Package(
8686
dependencies: [
8787
.package(url: "https://github.com/ReactiveCocoa/ReactiveSwift.git", from: "7.1.1"),
8888
.package(url: "https://github.com/ReactiveX/RxSwift.git", from: "6.2.0"),
89-
.package(url: "https://github.com/nicklockwood/SwiftFormat", .exact("0.44.14")),
89+
.package(url: "https://github.com/nicklockwood/SwiftFormat", exact: "0.44.14"),
9090
],
9191
targets: [
9292
// MARK: Workflow

Samples/AlertContainer/AlertContainer.podspec

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ Pod::Spec.new do |s|
1010
# 1.7 is needed for `swift_versions` support
1111
s.cocoapods_version = '>= 1.7.0'
1212

13-
s.swift_versions = ['5.0']
14-
s.ios.deployment_target = '11.0'
13+
s.swift_versions = [WORKFLOW_SWIFT_VERSION]
14+
s.ios.deployment_target = WORKFLOW_IOS_DEPLOYMENT_TARGET
1515

1616
s.source_files = 'Sources/**/*.swift'
1717

Samples/BackStackContainer/BackStackContainer.podspec

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ Pod::Spec.new do |s|
1010
# 1.7 is needed for `swift_versions` support
1111
s.cocoapods_version = '>= 1.7.0'
1212

13-
s.swift_versions = ['5.0']
14-
s.ios.deployment_target = '11.0'
13+
s.swift_versions = [WORKFLOW_SWIFT_VERSION]
14+
s.ios.deployment_target = WORKFLOW_IOS_DEPLOYMENT_TARGET
1515

1616
s.source_files = 'Sources/**/*.{swift}'
1717

Samples/ModalContainer/ModalContainer.podspec

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ Pod::Spec.new do |s|
1010
# 1.7 is needed for `swift_versions` support
1111
s.cocoapods_version = '>= 1.7.0'
1212

13-
s.swift_versions = ['5.0']
14-
s.ios.deployment_target = '11.0'
13+
s.swift_versions = [WORKFLOW_SWIFT_VERSION]
14+
s.ios.deployment_target = WORKFLOW_IOS_DEPLOYMENT_TARGET
1515

1616
s.source_files = 'Sources/**/*.swift'
1717

Samples/SampleApp/Podfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
project 'SampleApp.xcodeproj'
2-
platform :ios, '9.3'
2+
platform :ios, '14.0'
33

44
target 'SampleApp' do
55
pod 'Workflow', path: '../../Workflow.podspec', :testspecs => ['Tests']

Samples/SampleSwiftUIApp/Podfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
project 'SampleSwiftUIApp.xcodeproj'
2-
platform :ios, '13'
2+
platform :ios, '14.0'
33

44
target 'SampleSwiftUIApp' do
55
pod 'Workflow', path: '../../Workflow.podspec', :testspecs => ['Tests']

Samples/SplitScreenContainer/SplitScreenContainer.podspec

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ Pod::Spec.new do |s|
1010
# 1.7 is needed for `swift_versions` support
1111
s.cocoapods_version = '>= 1.7.0'
1212

13-
s.swift_versions = ['5.0']
14-
s.ios.deployment_target = '11.0'
13+
s.swift_versions = [WORKFLOW_SWIFT_VERSION]
14+
s.ios.deployment_target = WORKFLOW_IOS_DEPLOYMENT_TARGET
1515

1616
s.source_files = 'Sources/**/*.swift'
1717

Samples/Tutorial/Frameworks/Tutorial1Complete/Tutorial1.podspec

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ Pod::Spec.new do |s|
1010
# 1.7 is needed for `swift_versions` support
1111
s.cocoapods_version = '>= 1.7.0'
1212

13-
s.swift_versions = ['5.0']
14-
s.ios.deployment_target = '11.0'
13+
s.swift_versions = [WORKFLOW_SWIFT_VERSION]
14+
s.ios.deployment_target = WORKFLOW_IOS_DEPLOYMENT_TARGET
1515

1616
s.source_files = 'Sources/**/*.swift'
1717

Samples/Tutorial/Frameworks/Tutorial2Complete/Tutorial2.podspec

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ Pod::Spec.new do |s|
1010
# 1.7 is needed for `swift_versions` support
1111
s.cocoapods_version = '>= 1.7.0'
1212

13-
s.swift_versions = ['5.0']
14-
s.ios.deployment_target = '11.0'
13+
s.swift_versions = [WORKFLOW_SWIFT_VERSION]
14+
s.ios.deployment_target = WORKFLOW_IOS_DEPLOYMENT_TARGET
1515

1616
s.source_files = 'Sources/**/*.swift'
1717

Samples/Tutorial/Frameworks/Tutorial3Complete/Tutorial3.podspec

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ Pod::Spec.new do |s|
1010
# 1.7 is needed for `swift_versions` support
1111
s.cocoapods_version = '>= 1.7.0'
1212

13-
s.swift_versions = ['5.0']
14-
s.ios.deployment_target = '11.0'
13+
s.swift_versions = [WORKFLOW_SWIFT_VERSION]
14+
s.ios.deployment_target = WORKFLOW_IOS_DEPLOYMENT_TARGET
1515

1616
s.source_files = 'Sources/**/*.swift'
1717
s.resource_bundle = { 'TutorialResources' => ['Resources/**/*'] }

Samples/Tutorial/Frameworks/Tutorial4Complete/Tutorial4.podspec

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ Pod::Spec.new do |s|
1010
# 1.7 is needed for `swift_versions` support
1111
s.cocoapods_version = '>= 1.7.0'
1212

13-
s.swift_versions = ['5.0']
14-
s.ios.deployment_target = '11.0'
13+
s.swift_versions = [WORKFLOW_SWIFT_VERSION]
14+
s.ios.deployment_target = WORKFLOW_IOS_DEPLOYMENT_TARGET
1515

1616
s.source_files = 'Sources/**/*.swift'
1717
s.resource_bundle = { 'TutorialResources' => ['Resources/**/*'] }

Samples/Tutorial/Frameworks/Tutorial5Complete/Tutorial5.podspec

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ Pod::Spec.new do |s|
1010
# 1.7 is needed for `swift_versions` support
1111
s.cocoapods_version = '>= 1.7.0'
1212

13-
s.swift_versions = ['5.0']
14-
s.ios.deployment_target = '11.0'
13+
s.swift_versions = [WORKFLOW_SWIFT_VERSION]
14+
s.ios.deployment_target = WORKFLOW_IOS_DEPLOYMENT_TARGET
1515

1616
s.source_files = 'Sources/**/*.swift'
1717
s.resource_bundle = { 'TutorialResources' => ['Resources/**/*'] }

Samples/Tutorial/Frameworks/TutorialBase/TutorialBase.podspec

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ Pod::Spec.new do |s|
1010
# 1.7 is needed for `swift_versions` support
1111
s.cocoapods_version = '>= 1.7.0'
1212

13-
s.swift_versions = ['5.0']
14-
s.ios.deployment_target = '11.0'
13+
s.swift_versions = [WORKFLOW_SWIFT_VERSION]
14+
s.ios.deployment_target = WORKFLOW_IOS_DEPLOYMENT_TARGET
1515

1616
s.source_files = 'Sources/**/*.swift'
1717

Samples/Tutorial/Frameworks/TutorialViews/TutorialViews.podspec

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ Pod::Spec.new do |s|
1010
# 1.7 is needed for `swift_versions` support
1111
s.cocoapods_version = '>= 1.7.0'
1212

13-
s.swift_versions = ['5.0']
14-
s.ios.deployment_target = '11.0'
13+
s.swift_versions = [WORKFLOW_SWIFT_VERSION]
14+
s.ios.deployment_target = WORKFLOW_IOS_DEPLOYMENT_TARGET
1515

1616
s.source_files = 'Sources/**/*.swift'
1717
end

Samples/Tutorial/Podfile

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
require_relative('../../version')
2+
13
project 'Tutorial.xcodeproj'
2-
platform :ios, '11.0'
4+
platform :ios, WORKFLOW_IOS_DEPLOYMENT_TARGET
35

46
target 'Tutorial' do
57
pod 'Workflow', path: '../../Workflow.podspec', :testspecs => ['Tests']

0 commit comments

Comments
 (0)