diff --git a/.gitignore b/.gitignore
index 1c44ba6f2..495ddcb39 100644
--- a/.gitignore
+++ b/.gitignore
@@ -24,3 +24,7 @@ SampleApp.xcworkspace
# ios-snapshot-test-case Failure Diffs
FailureDiffs/
+
+Samples/**/*Info.plist
+!Samples/Tutorial/AppHost/Configuration/Info.plist
+!Samples/Tutorial/AppHost/TutorialTests/Info.plist
\ No newline at end of file
diff --git a/Development.podspec b/Development.podspec
index 274cf3b08..cd94e5ad5 100644
--- a/Development.podspec
+++ b/Development.podspec
@@ -13,6 +13,7 @@ Pod::Spec.new do |s|
s.dependency 'WorkflowUI'
s.dependency 'WorkflowReactiveSwift'
s.dependency 'WorkflowRxSwift'
+ # s.dependency 'WorkflowCombine' # TODO: Disabled because app specs cannot increase the deployment target of the root
s.source_files = 'Samples/Dummy.swift'
s.subspec 'Dummy' do |ss|
@@ -141,4 +142,34 @@ Pod::Spec.new do |s|
test_spec.dependency 'WorkflowTesting'
test_spec.dependency 'WorkflowRxSwiftTesting'
end
+
+ # TODO: Disabled because app specs cannot increase the deployment target of the root
+ # To use, increase the deployment target of this spec to 13.0 or higher
+ # s.app_spec 'WorkflowCombineSampleApp' do |app_spec|
+ # app_spec.source_files = 'Samples/WorkflowCombineSampleApp/WorkflowCombineSampleApp/**/*.swift'
+ # end
+ #
+ # s.test_spec 'WorkflowCombineSampleAppTests' do |test_spec|
+ # test_spec.dependency 'Development/WorkflowCombineSampleApp'
+ # test_spec.dependency 'WorkflowTesting'
+ # test_spec.requires_app_host = true
+ # test_spec.app_host_name = 'Development/WorkflowCombineSampleApp'
+ # test_spec.source_files = 'Samples/WorkflowCombineSampleApp/WorkflowCombineSampleAppUnitTests/**/*.swift'
+ # end
+
+ # s.test_spec 'WorkflowCombineTests' do |test_spec|
+ # test_spec.requires_app_host = true
+ # test_spec.source_files = 'WorkflowCombine/Tests/**/*.swift'
+ # test_spec.framework = 'XCTest'
+ # test_spec.dependency 'WorkflowTesting'
+ # test_spec.dependency 'WorkflowCombineTesting'
+ # end
+
+ # s.test_spec 'WorkflowCombineTestingTests' do |test_spec|
+ # test_spec.requires_app_host = true
+ # test_spec.source_files = 'WorkflowCombine/TestingTests/**/*.swift'
+ # test_spec.framework = 'XCTest'
+ # test_spec.dependency 'WorkflowTesting'
+ # test_spec.dependency 'WorkflowCombineTesting'
+ # end
end
diff --git a/Package.swift b/Package.swift
index 304565406..21dd18027 100644
--- a/Package.swift
+++ b/Package.swift
@@ -26,6 +26,10 @@ let package = Package(
name: "WorkflowReactiveSwift",
targets: ["WorkflowReactiveSwift"]
),
+ .library(
+ name: "WorkflowCombine",
+ targets: ["WorkflowCombine"]
+ ),
],
dependencies: [
.package(url: "https://github.com/ReactiveCocoa/ReactiveSwift.git", from: "6.3.0"),
@@ -62,6 +66,11 @@ let package = Package(
dependencies: ["ReactiveSwift", "Workflow"],
path: "WorkflowReactiveSwift/Sources"
),
+ .target(
+ name: "WorkflowCombine",
+ dependencies: ["Workflow"],
+ path: "WorkflowCombine/Sources"
+ ),
],
swiftLanguageVersions: [.v5]
)
diff --git a/Samples/SampleSwiftUIApp/SampleSwiftUIApp/Info.plist b/Samples/SampleSwiftUIApp/SampleSwiftUIApp/Info.plist
deleted file mode 100644
index 41456fbdd..000000000
--- a/Samples/SampleSwiftUIApp/SampleSwiftUIApp/Info.plist
+++ /dev/null
@@ -1,60 +0,0 @@
-
-
-
-
- CFBundleDevelopmentRegion
- $(DEVELOPMENT_LANGUAGE)
- CFBundleExecutable
- $(EXECUTABLE_NAME)
- CFBundleIdentifier
- $(PRODUCT_BUNDLE_IDENTIFIER)
- CFBundleInfoDictionaryVersion
- 6.0
- CFBundleName
- $(PRODUCT_NAME)
- CFBundlePackageType
- $(PRODUCT_BUNDLE_PACKAGE_TYPE)
- CFBundleShortVersionString
- 1.0
- CFBundleVersion
- 1
- LSRequiresIPhoneOS
-
- UIApplicationSceneManifest
-
- UIApplicationSupportsMultipleScenes
-
- UISceneConfigurations
-
- UIWindowSceneSessionRoleApplication
-
-
- UISceneConfigurationName
- Default Configuration
- UISceneDelegateClassName
- $(PRODUCT_MODULE_NAME).SceneDelegate
-
-
-
-
- UILaunchStoryboardName
-
- UIRequiredDeviceCapabilities
-
- armv7
-
- UISupportedInterfaceOrientations
-
- UIInterfaceOrientationPortrait
- UIInterfaceOrientationLandscapeLeft
- UIInterfaceOrientationLandscapeRight
-
- UISupportedInterfaceOrientations~ipad
-
- UIInterfaceOrientationPortrait
- UIInterfaceOrientationPortraitUpsideDown
- UIInterfaceOrientationLandscapeLeft
- UIInterfaceOrientationLandscapeRight
-
-
-
diff --git a/Samples/TicTacToe/Tests/Info.plist b/Samples/TicTacToe/Tests/Info.plist
deleted file mode 100644
index 64d65ca49..000000000
--- a/Samples/TicTacToe/Tests/Info.plist
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
- CFBundleDevelopmentRegion
- $(DEVELOPMENT_LANGUAGE)
- CFBundleExecutable
- $(EXECUTABLE_NAME)
- CFBundleIdentifier
- $(PRODUCT_BUNDLE_IDENTIFIER)
- CFBundleInfoDictionaryVersion
- 6.0
- CFBundleName
- $(PRODUCT_NAME)
- CFBundlePackageType
- $(PRODUCT_BUNDLE_PACKAGE_TYPE)
- CFBundleShortVersionString
- 1.0
- CFBundleVersion
- 1
-
-
diff --git a/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleApp/AppDelegate.swift b/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleApp/AppDelegate.swift
new file mode 100644
index 000000000..5e29780c2
--- /dev/null
+++ b/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleApp/AppDelegate.swift
@@ -0,0 +1,22 @@
+//
+// AppDelegate.swift
+// WorkflowCombineSampleApp
+//
+// Created by Soo Rin Park on 10/28/21.
+//
+
+import UIKit
+import WorkflowUI
+
+@UIApplicationMain
+class AppDelegate: UIResponder, UIApplicationDelegate {
+ var window: UIWindow?
+
+ func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
+ window = UIWindow(frame: UIScreen.main.bounds)
+ window?.rootViewController = ContainerViewController(workflow: DemoWorkflow())
+ window?.makeKeyAndVisible()
+
+ return true
+ }
+}
diff --git a/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleApp/DemoViewController.swift b/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleApp/DemoViewController.swift
new file mode 100644
index 000000000..1927c7c5d
--- /dev/null
+++ b/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleApp/DemoViewController.swift
@@ -0,0 +1,31 @@
+//
+// DemoViewController.swift
+// WorkflowCombineSampleApp
+//
+// Created by Soo Rin Park on 10/28/21.
+//
+
+import Foundation
+import UIKit
+import WorkflowUI
+
+class DemoViewController: ScreenViewController {
+ private let label = UILabel()
+
+ override func viewDidLoad() {
+ super.viewDidLoad()
+
+ label.translatesAutoresizingMaskIntoConstraints = false
+ view.addSubview(label)
+ label.leadingAnchor.constraint(equalTo: view.leadingAnchor).isActive = true
+ label.topAnchor.constraint(equalTo: view.topAnchor).isActive = true
+ label.trailingAnchor.constraint(equalTo: view.trailingAnchor).isActive = true
+ label.bottomAnchor.constraint(equalTo: view.bottomAnchor).isActive = true
+ }
+
+ override func screenDidChange(from previousScreen: DemoScreen, previousEnvironment: ViewEnvironment) {
+ super.screenDidChange(from: previousScreen, previousEnvironment: previousEnvironment)
+
+ label.text = screen.date
+ }
+}
diff --git a/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleApp/DemoWorker.swift b/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleApp/DemoWorker.swift
new file mode 100644
index 000000000..0721ceeee
--- /dev/null
+++ b/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleApp/DemoWorker.swift
@@ -0,0 +1,28 @@
+//
+// DemoWorker.swift
+// WorkflowCombineSampleApp
+//
+// Created by Soo Rin Park on 10/28/21.
+//
+
+import Combine
+import Workflow
+import WorkflowCombine
+
+// MARK: Workers
+
+extension DemoWorkflow {
+ struct DemoWorker: WorkflowCombine.Worker {
+ typealias Output = Action
+
+ // This publisher publishes the current date on a timer that fires every second
+ func run() -> AnyPublisher