diff --git a/.gitignore b/.gitignore index 1c44ba6f2..62f10b58b 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,6 @@ SampleApp.xcworkspace # ios-snapshot-test-case Failure Diffs FailureDiffs/ + +Samples/**/*Info.plist +!Samples/Tutorial/AppHost/Configuration/Info.plist \ No newline at end of file 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/Tutorial/AppHost/TutorialTests/Info.plist b/Samples/Tutorial/AppHost/TutorialTests/Info.plist deleted file mode 100644 index 6c40a6cd0..000000000 --- a/Samples/Tutorial/AppHost/TutorialTests/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 - BNDL - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - - diff --git a/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleApp/Assets.xcassets/AccentColor.colorset/Contents.json b/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleApp/Assets.xcassets/AccentColor.colorset/Contents.json deleted file mode 100644 index eb8789700..000000000 --- a/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleApp/Assets.xcassets/AccentColor.colorset/Contents.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "colors" : [ - { - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleApp/Assets.xcassets/AppIcon.appiconset/Contents.json b/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleApp/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 9221b9bb1..000000000 --- a/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleApp/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "images" : [ - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "20x20" - }, - { - "idiom" : "iphone", - "scale" : "3x", - "size" : "20x20" - }, - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "29x29" - }, - { - "idiom" : "iphone", - "scale" : "3x", - "size" : "29x29" - }, - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "40x40" - }, - { - "idiom" : "iphone", - "scale" : "3x", - "size" : "40x40" - }, - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "60x60" - }, - { - "idiom" : "iphone", - "scale" : "3x", - "size" : "60x60" - }, - { - "idiom" : "ipad", - "scale" : "1x", - "size" : "20x20" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "20x20" - }, - { - "idiom" : "ipad", - "scale" : "1x", - "size" : "29x29" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "29x29" - }, - { - "idiom" : "ipad", - "scale" : "1x", - "size" : "40x40" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "40x40" - }, - { - "idiom" : "ipad", - "scale" : "1x", - "size" : "76x76" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "76x76" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "83.5x83.5" - }, - { - "idiom" : "ios-marketing", - "scale" : "1x", - "size" : "1024x1024" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleApp/Assets.xcassets/Contents.json b/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleApp/Assets.xcassets/Contents.json deleted file mode 100644 index 73c00596a..000000000 --- a/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleApp/Assets.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleApp/Base.lproj/LaunchScreen.storyboard b/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleApp/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index 865e9329f..000000000 --- a/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleApp/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleApp/Base.lproj/Main.storyboard b/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleApp/Base.lproj/Main.storyboard deleted file mode 100644 index 25a763858..000000000 --- a/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleApp/Base.lproj/Main.storyboard +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleApp/DemoWorker.swift b/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleApp/DemoWorker.swift index 48fc17dc0..ede21d374 100644 --- a/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleApp/DemoWorker.swift +++ b/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleApp/DemoWorker.swift @@ -6,10 +6,8 @@ // import Combine -import ReactiveSwift import Workflow import WorkflowCombine -import WorkflowReactiveSwift import WorkflowUI // MARK: Workers diff --git a/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleApp/DemoWorkflow.swift b/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleApp/DemoWorkflow.swift index bc1e286ac..b94eb8855 100644 --- a/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleApp/DemoWorkflow.swift +++ b/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleApp/DemoWorkflow.swift @@ -19,7 +19,7 @@ struct DemoWorkflow: Workflow { // MARK: State and Initialization extension DemoWorkflow { - struct State { + struct State: Equatable { var date: Date } diff --git a/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleApp/Info.plist b/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleApp/Info.plist deleted file mode 100644 index 5b531f7b2..000000000 --- a/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleApp/Info.plist +++ /dev/null @@ -1,66 +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 - UISceneStoryboardFile - Main - - - - - UIApplicationSupportsIndirectInputEvents - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleApp/ViewController.swift b/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleApp/ViewController.swift deleted file mode 100644 index f582053e8..000000000 --- a/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleApp/ViewController.swift +++ /dev/null @@ -1,15 +0,0 @@ -// -// ViewController.swift -// WorkflowCombineSampleApp -// -// Created by Soo Rin Park on 10/28/21. -// - -import UIKit - -class ViewController: UIViewController { - override func viewDidLoad() { - super.viewDidLoad() - // Do any additional setup after loading the view. - } -} diff --git a/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleAppUnitTests/DemoWorkflowTests.swift b/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleAppUnitTests/DemoWorkflowTests.swift new file mode 100644 index 000000000..80bba0359 --- /dev/null +++ b/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleAppUnitTests/DemoWorkflowTests.swift @@ -0,0 +1,24 @@ +// +// DemoWorkflowTests.swift +// WorkflowCombineSampleAppUnitTests +// +// Created by Soo Rin Park on 11/1/21. +// + +import Combine +import Workflow +import WorkflowTesting +import XCTest +@testable import Development_WorkflowCombineSampleApp + +class DemoWorkflowTests: XCTestCase { + func test_workflowIsRenderedEverySecondForFiveSeconds() { + let expectedDate = Date(timeIntervalSince1970: 0) + + DemoWorkflow + .Action + .tester(withState: .init(date: Date())) // the initial date itself does not matter + .send(action: .init(publishedDate: expectedDate)) + .assert(state: .init(date: expectedDate)) + } +} diff --git a/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleAppUnitTests/Info.plist b/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleAppUnitTests/Info.plist deleted file mode 100644 index 64d65ca49..000000000 --- a/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleAppUnitTests/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/WorkflowCombineSampleAppUnitTests/WorkflowCombineSampleAppUnitTests.swift b/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleAppUnitTests/WorkflowCombineSampleAppUnitTests.swift deleted file mode 100644 index 6d10c76a1..000000000 --- a/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleAppUnitTests/WorkflowCombineSampleAppUnitTests.swift +++ /dev/null @@ -1,28 +0,0 @@ -// -// WorkflowCombineSampleAppUnitTests.swift -// WorkflowCombineSampleAppUnitTests -// -// Created by Soo Rin Park on 11/1/21. -// - -import Combine -import Workflow -import XCTest -@testable import Development_WorkflowCombineSampleApp - -class DemoWorkerTests: XCTestCase { - func test_workflowIsRenderedEverySecondForFiveSeconds() { - let host = WorkflowHost(workflow: DemoWorkflow()) - - let expectation = XCTestExpectation(description: "host rendering is updated every second") - expectation.expectedFulfillmentCount = 5 - let disposable = host.rendering.signal.observeValues { rendering in - print(rendering) - expectation.fulfill() - } - - // buffer milisecond is added to account for the workflow to start running - wait(for: [expectation], timeout: 5.1) - disposable?.dispose() - } -}