From b30be8ced5d3241b0a9fa17f82aa36ddd818e2e6 Mon Sep 17 00:00:00 2001 From: Megan Wiemer Date: Tue, 27 Jul 2021 15:04:11 -0500 Subject: [PATCH 01/12] [testing-platforms ] - Includes macOS, tvOS, and watchOS as platforms - MW --- Package.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index 613625627..2a1304d40 100644 --- a/Package.swift +++ b/Package.swift @@ -5,7 +5,7 @@ import PackageDescription let package = Package( name: "SwiftCurrent", - platforms: [.iOS(.v11)], + platforms: [.iOS(.v11), .macOS(.v11), .tvOS(.v14), .watchOS(.v7)], products: [ .library( name: "SwiftCurrent", From dcb278297fbe9700ec3a668db374f5ba402e246d Mon Sep 17 00:00:00 2001 From: Richard Gist Date: Tue, 3 Aug 2021 14:44:55 -0600 Subject: [PATCH 02/12] [testing_platforms] - Adding subspec deployment targets as recommended by Morgan - MZ RAG Co-authored-by: Morgan Zellers --- SwiftCurrent.podspec | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/SwiftCurrent.podspec b/SwiftCurrent.podspec index 69aeb6104..f623e791c 100644 --- a/SwiftCurrent.podspec +++ b/SwiftCurrent.podspec @@ -17,6 +17,10 @@ Pod::Spec.new do |s| s.module_name = 'SwiftCurrent' s.subspec 'Core' do |ss| + ss.ios.deployment_target = '11.0' + ss.macos.deployment_target = '11.0' + ss.tvos.deployment_target = '14.0' + ss.watchos.deployment_target = '7.0' ss.source_files = 'Sources/SwiftCurrent/**/*.{swift,h,m}' end @@ -28,6 +32,9 @@ Pod::Spec.new do |s| s.subspec 'BETA_SwiftUI' do |ss| ss.ios.deployment_target = '11.0' + ss.macos.deployment_target = '11.0' + ss.tvos.deployment_target = '14.0' + ss.watchos.deployment_target = '7.0' ss.source_files = 'Sources/SwiftCurrent_SwiftUI/**/*.{swift,h,m}' ss.dependency 'SwiftCurrent/Core' end From f4c63f0fa042e317a9f9bcc912d3dd1a1a9de1ae Mon Sep 17 00:00:00 2001 From: Morgan Zellers Date: Wed, 4 Aug 2021 07:53:57 -0500 Subject: [PATCH 03/12] [testing_platforms] - Upping watchOS version high enough to require Xcode 12.5 --- SwiftCurrent.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SwiftCurrent.podspec b/SwiftCurrent.podspec index f623e791c..f331267f8 100644 --- a/SwiftCurrent.podspec +++ b/SwiftCurrent.podspec @@ -20,7 +20,7 @@ Pod::Spec.new do |s| ss.ios.deployment_target = '11.0' ss.macos.deployment_target = '11.0' ss.tvos.deployment_target = '14.0' - ss.watchos.deployment_target = '7.0' + ss.watchos.deployment_target = '7.4' ss.source_files = 'Sources/SwiftCurrent/**/*.{swift,h,m}' end @@ -34,7 +34,7 @@ Pod::Spec.new do |s| ss.ios.deployment_target = '11.0' ss.macos.deployment_target = '11.0' ss.tvos.deployment_target = '14.0' - ss.watchos.deployment_target = '7.0' + ss.watchos.deployment_target = '7.4' ss.source_files = 'Sources/SwiftCurrent_SwiftUI/**/*.{swift,h,m}' ss.dependency 'SwiftCurrent/Core' end From 4c9a13bbc1a5ad0f02171950f354852d0ffb027f Mon Sep 17 00:00:00 2001 From: Morgan Zellers Date: Wed, 4 Aug 2021 08:12:32 -0500 Subject: [PATCH 04/12] [testing_platforms] - removing watchOS support from cocoapods --- SwiftCurrent.podspec | 2 -- 1 file changed, 2 deletions(-) diff --git a/SwiftCurrent.podspec b/SwiftCurrent.podspec index f331267f8..01cd7e32b 100644 --- a/SwiftCurrent.podspec +++ b/SwiftCurrent.podspec @@ -20,7 +20,6 @@ Pod::Spec.new do |s| ss.ios.deployment_target = '11.0' ss.macos.deployment_target = '11.0' ss.tvos.deployment_target = '14.0' - ss.watchos.deployment_target = '7.4' ss.source_files = 'Sources/SwiftCurrent/**/*.{swift,h,m}' end @@ -34,7 +33,6 @@ Pod::Spec.new do |s| ss.ios.deployment_target = '11.0' ss.macos.deployment_target = '11.0' ss.tvos.deployment_target = '14.0' - ss.watchos.deployment_target = '7.4' ss.source_files = 'Sources/SwiftCurrent_SwiftUI/**/*.{swift,h,m}' ss.dependency 'SwiftCurrent/Core' end From 95fad8a5d3fb884dde9ca3e321d489e85649c7a3 Mon Sep 17 00:00:00 2001 From: Richard Gist Date: Wed, 4 Aug 2021 09:49:41 -0600 Subject: [PATCH 05/12] [testing_platforms] - Trying to fix TestOnly compilation on watchOS for xcode 12.4 - MW RAG Co-authored-by: Megan Wiemer --- Sources/SwiftCurrent/TestOnly/TestOnly.swift | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Sources/SwiftCurrent/TestOnly/TestOnly.swift b/Sources/SwiftCurrent/TestOnly/TestOnly.swift index 920096416..0d84c7b64 100644 --- a/Sources/SwiftCurrent/TestOnly/TestOnly.swift +++ b/Sources/SwiftCurrent/TestOnly/TestOnly.swift @@ -10,15 +10,19 @@ import Foundation -#if canImport(XCTest) +@available(iOS 14.0, macOS 11, tvOS 14.0, watchOS 7.4, *) extension Notification.Name { + #if canImport(XCTest) /// :nodoc: A notification only available when tests are being run that lets you know a workflow has been launched. public static var workflowLaunched: Notification.Name { .init(rawValue: "WorkflowLaunched") } + #endif } +@available(iOS 14.0, macOS 11, tvOS 14.0, watchOS 7.4, *) extension FlowRepresentable { + #if canImport(XCTest) /// :nodoc: Your tests may want to manually set the closure so they can make assertions it was called, this is simply a convenience available for that. public var proceedInWorkflowStorage: ((AnyWorkflow.PassedArgs) -> Void)? { get { { _workflowPointer?.proceedInWorkflowStorage?($0) } } @@ -38,5 +42,5 @@ extension FlowRepresentable { } } } + #endif } -#endif From 5547706fab0fce75b62381350695164d63410a25 Mon Sep 17 00:00:00 2001 From: Richard Gist Date: Wed, 4 Aug 2021 09:57:55 -0600 Subject: [PATCH 06/12] [testing_platforms] - Forgot to tweak the available line copied from elsewhere - MW RAG Co-authored-by: Megan Wiemer --- Sources/SwiftCurrent/TestOnly/TestOnly.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/SwiftCurrent/TestOnly/TestOnly.swift b/Sources/SwiftCurrent/TestOnly/TestOnly.swift index 0d84c7b64..ac6851d95 100644 --- a/Sources/SwiftCurrent/TestOnly/TestOnly.swift +++ b/Sources/SwiftCurrent/TestOnly/TestOnly.swift @@ -10,7 +10,7 @@ import Foundation -@available(iOS 14.0, macOS 11, tvOS 14.0, watchOS 7.4, *) +@available(iOS 11.0, macOS 10.14, tvOS 13, watchOS 7.4, *) extension Notification.Name { #if canImport(XCTest) /// :nodoc: A notification only available when tests are being run that lets you know a workflow has been launched. @@ -20,7 +20,7 @@ extension Notification.Name { #endif } -@available(iOS 14.0, macOS 11, tvOS 14.0, watchOS 7.4, *) +@available(iOS 11.0, macOS 10.14, tvOS 13, watchOS 7.4, *) extension FlowRepresentable { #if canImport(XCTest) /// :nodoc: Your tests may want to manually set the closure so they can make assertions it was called, this is simply a convenience available for that. From 7dc06a019e0324bb3cca14f4075daf4d4e5a96d4 Mon Sep 17 00:00:00 2001 From: Richard Gist Date: Wed, 4 Aug 2021 15:08:11 -0600 Subject: [PATCH 07/12] [testing_platforms] - Adding swift building for appletv - RAG --- .../Extensions/LaunchStyleAdditions.swift | 6 ++++-- fastlane/Fastfile | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Sources/SwiftCurrent_UIKit/Extensions/LaunchStyleAdditions.swift b/Sources/SwiftCurrent_UIKit/Extensions/LaunchStyleAdditions.swift index 0cd96550c..458cb345a 100644 --- a/Sources/SwiftCurrent_UIKit/Extensions/LaunchStyleAdditions.swift +++ b/Sources/SwiftCurrent_UIKit/Extensions/LaunchStyleAdditions.swift @@ -121,13 +121,15 @@ extension UIModalPresentationStyle { static func styleFor(_ style: LaunchStyle.PresentationType.ModalPresentationStyle) -> UIModalPresentationStyle? { switch style { case .fullScreen: return .fullScreen - case .pageSheet: return .pageSheet - case .formSheet: return .formSheet case .currentContext: return .currentContext case .custom: return .custom case .overFullScreen: return .overFullScreen case .overCurrentContext: return .overCurrentContext + #if !os(tvOS) + case .pageSheet: return .pageSheet + case .formSheet: return .formSheet case .popover: return .popover + #endif case .automatic: if #available(iOS 13.0, *) { return .automatic } diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 1a5b8d204..416320e46 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -18,6 +18,7 @@ platform :ios do lane :build_swiftpm do sh('swift build --package-path="../" -Xswiftc "-sdk" -Xswiftc "`xcrun --sdk iphonesimulator --show-sdk-path`" -Xswiftc "-target" -Xswiftc "x86_64-apple-ios14.0-simulator"') + sh('swift build --package-path="../" -Xswiftc "-sdk" -Xswiftc "`xcrun --sdk appletvsimulator --show-sdk-path`" -Xswiftc "-target" -Xswiftc "x86_64-apple-tvos14.0-simulator"') end lane :cocoapods_liblint do From 22aed435c81810e8226d0d4a2b218821fd6e02e2 Mon Sep 17 00:00:00 2001 From: Richard Gist Date: Wed, 4 Aug 2021 16:11:30 -0600 Subject: [PATCH 08/12] [testing_platforms] - Adding tvos as a deployment target to UIKit subspec because we can in SPM - RAG --- SwiftCurrent.podspec | 1 + 1 file changed, 1 insertion(+) diff --git a/SwiftCurrent.podspec b/SwiftCurrent.podspec index 01cd7e32b..fa5f80934 100644 --- a/SwiftCurrent.podspec +++ b/SwiftCurrent.podspec @@ -25,6 +25,7 @@ Pod::Spec.new do |s| s.subspec 'UIKit' do |ss| ss.ios.deployment_target = '11.0' + ss.tvos.deployment_target = '14.0' ss.source_files = 'Sources/SwiftCurrent_UIKit/**/*.{swift,h,m}' ss.dependency 'SwiftCurrent/Core' end From 3c7d8dcb8ccd6785b1a13242b090f15b57d3fada Mon Sep 17 00:00:00 2001 From: Richard Gist Date: Wed, 4 Aug 2021 16:39:21 -0600 Subject: [PATCH 09/12] [testing_platforms] - Added support matrix to SECURITY.md - TT RAG --- .github/SECURITY.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/SECURITY.md b/.github/SECURITY.md index b4caf73c2..1577753ab 100644 --- a/.github/SECURITY.md +++ b/.github/SECURITY.md @@ -2,7 +2,15 @@ ## Supported Versions -#### We will *not* support anything more than 2 major versions back. +### Minimum Supported Platforms Versions + +| SPM / CocoaPods | iOS | watchOS | macOS | tvOS | +| --------------- | --- | ------- | ----- | ---- | +| SwiftCurrent - Core | 11 / 11 | 7 / 7 | 11 / 11 | 14 / 14 | +| SwiftCurrent - UIKit | 11 / 11 | X / X | 11 / 11 | 14 / 14 | +| SwiftCurrent - SwiftUI | 11 / 11 | 7 / 7 | 11 / 11 | 14 / 14 | + +### We will *not* support anything more than 2 major versions back. We support the latest version of the library, by which we mean we have processes, and robust automated testing around our latest releases. That being said if you have a need for an older version of the library to get updated, that is something we can make reasonable accommodations on an as-needed basis. From 2f920c6a41a2fd379d8f0b869665683c6ec6242e Mon Sep 17 00:00:00 2001 From: Richard Gist Date: Wed, 4 Aug 2021 17:19:26 -0600 Subject: [PATCH 10/12] [testing_platforms] - Revised swift build to use newer parameters and adding another line - TT RAG --- fastlane/Fastfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 416320e46..be44c396b 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -17,8 +17,12 @@ platform :ios do end lane :build_swiftpm do - sh('swift build --package-path="../" -Xswiftc "-sdk" -Xswiftc "`xcrun --sdk iphonesimulator --show-sdk-path`" -Xswiftc "-target" -Xswiftc "x86_64-apple-ios14.0-simulator"') - sh('swift build --package-path="../" -Xswiftc "-sdk" -Xswiftc "`xcrun --sdk appletvsimulator --show-sdk-path`" -Xswiftc "-target" -Xswiftc "x86_64-apple-tvos14.0-simulator"') + sh('swift build --package-path="../" --sdk "`xcrun --sdk iphonesimulator --show-sdk-path`" -Xswiftc "-target" -Xswiftc "x86_64-apple-ios14.0-simulator"') + sh('swift build --package-path="../" --sdk "`xcrun --sdk appletvsimulator --show-sdk-path`" -Xswiftc "-target" -Xswiftc "x86_64-apple-tvos14.0-simulator"') + + ## Possible new approach starting here though this first line should be included if we don't continue + # Confirm Core can build against Swift without any Apple SDK requirements + sh('swift build --package-path="./" --target SwiftCurrent') end lane :cocoapods_liblint do From 76949eaf508af29e0effce3ea4d9be51a9260811 Mon Sep 17 00:00:00 2001 From: Richard Gist Date: Thu, 5 Aug 2021 09:05:22 -0600 Subject: [PATCH 11/12] [testing_platforms] - Building each target for each special SDK that is supported then all targets for common SDKs - RAG --- fastlane/Fastfile | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index be44c396b..f56024e92 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -17,12 +17,19 @@ platform :ios do end lane :build_swiftpm do + # Confirm Core can build against Swift without any Apple SDK requirements + sh('swift build --package-path="../" --target SwiftCurrent') + sh('swift build --package-path="../" --target SwiftCurrent --sdk "`xcrun --sdk watchsimulator --show-sdk-path`" -Xswiftc "-target" -Xswiftc "x86_64-apple-watchos7.0-simulator"') + sh('swift build --package-path="../" --target SwiftCurrent --sdk "`xcrun --sdk macosx --show-sdk-path`"') + + # Confirm SwiftCurrent_SwiftUI + sh('swift build --package-path="../" --target SwiftCurrent_SwiftUI') + sh('swift build --package-path="../" --target SwiftCurrent_SwiftUI --sdk "`xcrun --sdk watchsimulator --show-sdk-path`" -Xswiftc "-target" -Xswiftc "x86_64-apple-watchos7.0-simulator"') + sh('swift build --package-path="../" --target SwiftCurrent_SwiftUI --sdk "`xcrun --sdk macosx --show-sdk-path`"') + + # Confirm all products against iOS and tvOS sh('swift build --package-path="../" --sdk "`xcrun --sdk iphonesimulator --show-sdk-path`" -Xswiftc "-target" -Xswiftc "x86_64-apple-ios14.0-simulator"') sh('swift build --package-path="../" --sdk "`xcrun --sdk appletvsimulator --show-sdk-path`" -Xswiftc "-target" -Xswiftc "x86_64-apple-tvos14.0-simulator"') - - ## Possible new approach starting here though this first line should be included if we don't continue - # Confirm Core can build against Swift without any Apple SDK requirements - sh('swift build --package-path="./" --target SwiftCurrent') end lane :cocoapods_liblint do From 127247e137f466cd49b8c8a8b058190e5deb8a7f Mon Sep 17 00:00:00 2001 From: Richard Gist Date: Thu, 5 Aug 2021 11:12:20 -0600 Subject: [PATCH 12/12] [testing_platforms] - -m Bumping minor version to correspond with expanding version support - RAG --- SwiftCurrent.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SwiftCurrent.podspec b/SwiftCurrent.podspec index fa5f80934..6e386d3de 100644 --- a/SwiftCurrent.podspec +++ b/SwiftCurrent.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'SwiftCurrent' - s.version = '4.2.10' + s.version = '4.3.0' s.summary = 'A library for complex workflows in Swift' s.description = <<-DESC SwiftCurrent is a library that lets you easily manage journeys through your Swift application.