From b2db1baad4851b30f445eb95b0d5dbaac2ce929d Mon Sep 17 00:00:00 2001 From: Andrew Watt Date: Thu, 22 Aug 2024 18:42:13 -0700 Subject: [PATCH 01/11] tuist project setup --- .gitignore | 18 +- .mise.toml | 7 + Package.swift | 2 +- Samples/Project.swift | 337 ++++++++++++++++++++++++++++++++++++ Samples/Tuist/Package.swift | 30 ++++ 5 files changed, 382 insertions(+), 12 deletions(-) create mode 100644 .mise.toml create mode 100644 Samples/Project.swift create mode 100644 Samples/Tuist/Package.swift diff --git a/.gitignore b/.gitignore index c64a570a1..a5519affd 100644 --- a/.gitignore +++ b/.gitignore @@ -19,17 +19,13 @@ gen/ # Xcode xcuserdata/ -# Sample workspace -SampleApp.xcworkspace - -# XcodeGen -Workflow.xcodeproj/ -/TestingSupport/AppHost/App/Info.plist +# Tuist +/Derived +/Samples/Derived +/Samples/Tutorial/Derived +/Samples/*.xcodeproj +/Samples/*.xcworkspace +/*.xcodeproj # ios-snapshot-test-case Failure Diffs FailureDiffs/ - -Samples/**/*Info.plist -!Samples/Tutorial/AppHost/Configuration/Info.plist -!Samples/Tutorial/AppHost/TutorialTests/Info.plist -!Samples/AsyncWorker/AsyncWorker/Info.plist diff --git a/.mise.toml b/.mise.toml new file mode 100644 index 000000000..ad6f21f9c --- /dev/null +++ b/.mise.toml @@ -0,0 +1,7 @@ +[tools] +tuist = "4.23.0" +swiftformat = "0.54.2" + +[settings] +# do not try to read versions from .nvmrc, .ruby-version, etc. +legacy_version_file = false diff --git a/Package.swift b/Package.swift index 3f8fc3b75..0ef607289 100644 --- a/Package.swift +++ b/Package.swift @@ -171,7 +171,7 @@ let package = Package( ), .testTarget( name: "WorkflowRxSwiftTests", - dependencies: ["WorkflowRxSwiftTesting", "WorkflowReactiveSwift"], + dependencies: ["WorkflowRxSwiftTesting"], path: "WorkflowRxSwift/Tests" ), .target( diff --git a/Samples/Project.swift b/Samples/Project.swift new file mode 100644 index 000000000..68f0cda0b --- /dev/null +++ b/Samples/Project.swift @@ -0,0 +1,337 @@ +import Foundation +import ProjectDescription + +let workflowBundleIdPrefix = "com.squareup.workflow" +let workflowDestinations: ProjectDescription.Destinations = .iOS +let workflowDeploymentTargets: DeploymentTargets = .iOS("15.0") + +extension Target { + + static func app( + name: String, + sources: ProjectDescription.SourceFilesList, + resources: ProjectDescription.ResourceFileElements? = nil, + dependencies: [TargetDependency] = [] + ) -> Self { + .target( + name: name, + destinations: workflowDestinations, + product: .app, + bundleId: "\(workflowBundleIdPrefix).\(name)", + deploymentTargets: workflowDeploymentTargets, + infoPlist: .extendingDefault( + with: [ + "UILaunchScreen": ["UIColorName": ""], + ] + ), + sources: sources, + resources: resources, + dependencies: dependencies + ) + } + + static func target( + name: String, + sources: ProjectDescription.SourceFilesList? = nil, + resources: ProjectDescription.ResourceFileElements? = nil, + dependencies: [TargetDependency] = [] + ) -> Self { + .target( + name: name, + destinations: workflowDestinations, + product: .framework, + bundleId: "\(workflowBundleIdPrefix).\(name)", + deploymentTargets: workflowDeploymentTargets, + sources: sources ?? "\(name)/Sources/**", + resources: resources, + dependencies: dependencies + ) + } + + static func unitTest( + for moduleUnderTest: String, + testName: String = "Tests", + sources: ProjectDescription.SourceFilesList? = nil, + dependencies: [TargetDependency] = [], + environmentVariables: [String : EnvironmentVariable] = [:] + ) -> Self { + let name = "\(moduleUnderTest)-\(testName)" + return .target( + name: name, + destinations: workflowDestinations, + product: .unitTests, + bundleId: "\(workflowBundleIdPrefix).\(name)", + deploymentTargets: workflowDeploymentTargets, + sources: sources ?? "\(moduleUnderTest)/\(testName)/**", + dependencies: dependencies, + environmentVariables: environmentVariables + + ) + } + + static func snapshotTest( + for moduleUnderTest: String, + testName: String = "SnapshotTests", + sources: ProjectDescription.SourceFilesList? = nil, + dependencies: [TargetDependency] = [] + ) -> Self { + .unitTest( + for: moduleUnderTest, + testName: testName, + sources: sources, + dependencies: dependencies, + environmentVariables: snapshotEnvironment + ) + } +} + +let snapshotEnvironment: [String: EnvironmentVariable] = { + let samplesPath = URL(filePath: #file) + .deletingLastPathComponent() + .path + + return [ + "FB_REFERENCE_IMAGE_DIR": .environmentVariable( + value: "\(samplesPath)/SnapshotTests/ReferenceImages", + isEnabled: true + ), + "IMAGE_DIFF_DIR": .environmentVariable( + value: "\(samplesPath)/SnapshotTests/FailureDiffs", + isEnabled: true + ), + ] +}() + +let project = Project( + name: "Development", + settings: .settings(base: ["ENABLE_MODULE_VERIFIER": "YES"]), + targets: [ + + // MARK: - Samples + + .target( + name: "AlertContainer", + dependencies: [.external(name: "WorkflowUI")] + ), + + // TODO: AsyncWorker has a dedicated xcodeproj + + .target( + name: "BackStackContainer", + dependencies: [.external(name: "WorkflowUI")] + ), + + .target( + name: "ModalContainer", + dependencies: [.external(name: "WorkflowUI")] + ), + + .app( + name: "ObservableScreen", + sources: "ObservableScreen/Sources/**", + dependencies: [.external(name: "WorkflowSwiftUI")] + ), + + .app( + name: "SampleApp", + sources: "SampleApp/Sources/**", + dependencies: [.external(name: "WorkflowUI")] + ), + + .target( + name: "SplitScreenContainer", + dependencies: [.external(name: "WorkflowUI")] + ), + .app( + name: "SplitScreenContainer-DemoApp", + sources: "SplitScreenContainer/DemoApp/**", + dependencies: [.target(name: "SplitScreenContainer")] + ), + .snapshotTest( + for: "SplitScreenContainer", + dependencies: [ + .target(name: "SplitScreenContainer"), + .external(name: "iOSSnapshotTestCase"), + ] + ), + + .app( + name: "TicTacToe", + sources: "TicTacToe/Sources/**", + dependencies: [ + .target(name: "AlertContainer"), + .target(name: "BackStackContainer"), + .target(name: "ModalContainer"), + ] + ), + .unitTest( + for: "TicTacToe", + dependencies: [ + .target(name: "TicTacToe"), + .external(name: "WorkflowReactiveSwiftTesting"), + .external(name: "WorkflowTesting"), + ] + ), + + // TODO: Tutorial has a dedicated xcodeproj + + .app( + name: "WorkflowCombineSampleApp", + sources: "WorkflowCombineSampleApp/WorkflowCombineSampleApp/**", + dependencies: [ + .external(name: "WorkflowCombine"), + .external(name: "WorkflowUI"), + ] + ), + .unitTest( + for: "WorkflowCombineSampleApp", + sources: "WorkflowCombineSampleApp/WorkflowCombineSampleAppUnitTests/**", + dependencies: [ + .target(name: "WorkflowCombineSampleApp"), + .external(name: "WorkflowTesting"), + ] + ), + + // MARK: - Workflow Tests + + // Some of these tests are duplicates of the test definitions in the root Package.swift, but Tuist + // does not currently support creating targets for tests in SwiftPM dependencies. See + // https://github.com/tuist/tuist/issues/5912 + + .app( + name: "TestAppHost", + sources: "../TestingSupport/AppHost/Sources/**" + ), + + .unitTest( + for: "ViewEnvironmentUI", + sources: "../ViewEnvironmentUI/Tests/**", + dependencies: [ + .external(name: "ViewEnvironmentUI"), + .target(name: "TestAppHost"), + ] + ), + + .unitTest( + for: "Workflow", + sources: "../Workflow/Tests/**", + dependencies: [.external(name: "Workflow")] + ), + .unitTest( + for: "WorkflowTesting", + sources: "../WorkflowTesting/Tests/**", + dependencies: [.external(name: "WorkflowTesting")] + ), + + .unitTest( + for: "WorkflowCombine", + sources: "../WorkflowCombine/Tests/**", + dependencies: [ + .external(name: "WorkflowCombine"), + .external(name: "WorkflowCombineTesting"), + ] + ), + .unitTest( + for: "WorkflowCombineTesting", + sources: "../WorkflowCombine/TestingTests/**", + dependencies: [.external(name: "WorkflowCombineTesting")] + ), + + .unitTest( + for: "WorkflowConcurrency", + sources: "../WorkflowConcurrency/Tests/**", + dependencies: [.external(name: "WorkflowConcurrency")] + ), + .unitTest( + for: "WorkflowConcurrencyTesting", + sources: "../WorkflowConcurrency/TestingTests/**", + dependencies: [.external(name: "WorkflowConcurrencyTesting")] + ), + + .unitTest( + for: "WorkflowReactiveSwift", + sources: "../WorkflowReactiveSwift/Tests/**", + dependencies: [.external(name: "WorkflowReactiveSwift")] + ), + .unitTest( + for: "WorkflowReactiveSwiftTesting", + sources: "../WorkflowReactiveSwift/TestingTests/**", + dependencies: [.external(name: "WorkflowReactiveSwiftTesting")] + ), + + .unitTest( + for: "WorkflowRxSwift", + sources: "../WorkflowRxSwift/Tests/**", + dependencies: [.external(name: "WorkflowRxSwift")] + ), + .unitTest( + for: "WorkflowRxSwiftTesting", + sources: "../WorkflowRxSwift/TestingTests/**", + dependencies: [.external(name: "WorkflowRxSwiftTesting")] + ), + + .unitTest( + for: "WorkflowSwiftUI", + sources: "../WorkflowSwiftUI/Tests/**", + dependencies: [.external(name: "WorkflowSwiftUI")] + ), + + .unitTest( + for: "WorkflowSwiftUIExperimental", + sources: "../WorkflowSwiftUIExperimental/Tests/**", + dependencies: [.external(name: "WorkflowSwiftUIExperimental")] + ), + + // It's not currently possible to create a Tuist target that depends on a macro target. See + // https://github.com/tuist/tuist/issues/5827, https://github.com/tuist/tuist/issues/6651, + // and similar issues. + + // .unitTest( + // for: "WorkflowSwiftUIMacros", + // sources: "../WorkflowSwiftUIMacros/Tests/**", + // dependencies: [.external(name: "WorkflowSwiftUIMacros")] + // ), + + .unitTest( + for: "WorkflowUI", + sources: "../WorkflowUI/Tests/**", + dependencies: [ + .external(name: "WorkflowUI"), + .external(name: "WorkflowReactiveSwift"), + .target(name: "TestAppHost"), + ] + ) + ], + schemes: [ + .scheme( + name: "UnitTests", + testAction: .targets( + [ + "TicTacToe-Tests", + "ViewEnvironmentUI-Tests", + "Workflow-Tests", + "WorkflowCombine-Tests", + "WorkflowCombineSampleApp-Tests", + "WorkflowCombineTesting-Tests", + "WorkflowConcurrency-Tests", + "WorkflowConcurrencyTesting-Tests", + "WorkflowReactiveSwift-Tests", + "WorkflowReactiveSwiftTesting-Tests", + "WorkflowRxSwift-Tests", + "WorkflowRxSwiftTesting-Tests", + "WorkflowSwiftUI-Tests", + "WorkflowSwiftUIExperimental-Tests", + "WorkflowTesting-Tests", + "WorkflowUI-Tests", + ] + ) + ), + .scheme( + name: "SnapshotTests", + testAction: .targets( + ["SplitScreenContainer-SnapshotTests"], + arguments: .arguments(environmentVariables: snapshotEnvironment) + ) + ), + ] +) diff --git a/Samples/Tuist/Package.swift b/Samples/Tuist/Package.swift new file mode 100644 index 000000000..346d00577 --- /dev/null +++ b/Samples/Tuist/Package.swift @@ -0,0 +1,30 @@ +// swift-tools-version: 5.9 + +import PackageDescription + +#if TUIST +import ProjectDescription + +let packageSettings = PackageSettings( + productTypes: [ + "ViewEnvironmentUI": .framework, + "ViewEnvironment": .framework, + "Workflow": .framework, + "WorkflowUI": .framework, + "ReactiveSwift": .framework, + "iOSSnapshotTestCase": .framework + ], + targetSettings: [ + "iOSSnapshotTestCase": ["ENABLE_TESTING_SEARCH_PATHS": "YES"] + ] +) + +#endif + +let package = Package( + name: "Development", + dependencies: [ + .package(path: "../../"), + .package(url: "https://github.com/uber/ios-snapshot-test-case.git", from: "8.0.0"), + ] +) From 7a02d4ae1c5c19d8bff4be6be9df7261a03d7424 Mon Sep 17 00:00:00 2001 From: Andrew Watt Date: Tue, 3 Sep 2024 18:15:39 -0700 Subject: [PATCH 02/11] link xctest from testing frameworks --- Package.swift | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Package.swift b/Package.swift index 0ef607289..c7b194e9d 100644 --- a/Package.swift +++ b/Package.swift @@ -82,7 +82,8 @@ let package = Package( .target( name: "WorkflowTesting", dependencies: ["Workflow"], - path: "WorkflowTesting/Sources" + path: "WorkflowTesting/Sources", + linkerSettings: [.linkedFramework("XCTest")] ), .testTarget( name: "WorkflowTestingTests", @@ -154,7 +155,8 @@ let package = Package( .target( name: "WorkflowReactiveSwiftTesting", dependencies: ["WorkflowReactiveSwift", "WorkflowTesting"], - path: "WorkflowReactiveSwift/Testing" + path: "WorkflowReactiveSwift/Testing", + linkerSettings: [.linkedFramework("XCTest")] ), .testTarget( name: "WorkflowReactiveSwiftTestingTests", @@ -177,7 +179,8 @@ let package = Package( .target( name: "WorkflowRxSwiftTesting", dependencies: ["WorkflowRxSwift", "WorkflowTesting"], - path: "WorkflowRxSwift/Testing" + path: "WorkflowRxSwift/Testing", + linkerSettings: [.linkedFramework("XCTest")] ), .testTarget( name: "WorkflowRxSwiftTestingTests", @@ -200,7 +203,8 @@ let package = Package( .target( name: "WorkflowCombineTesting", dependencies: ["WorkflowCombine", "WorkflowTesting"], - path: "WorkflowCombine/Testing" + path: "WorkflowCombine/Testing", + linkerSettings: [.linkedFramework("XCTest")] ), .testTarget( name: "WorkflowCombineTestingTests", @@ -223,7 +227,8 @@ let package = Package( .target( name: "WorkflowConcurrencyTesting", dependencies: ["WorkflowConcurrency", "WorkflowTesting"], - path: "WorkflowConcurrency/Testing" + path: "WorkflowConcurrency/Testing", + linkerSettings: [.linkedFramework("XCTest")] ), .testTarget( name: "WorkflowConcurrencyTestingTests", From bf6458877738912b8d85be2d36b4c6f6eeb2ab21 Mon Sep 17 00:00:00 2001 From: Andrew Watt Date: Tue, 3 Sep 2024 18:16:40 -0700 Subject: [PATCH 03/11] fix imports --- Samples/BackStackContainer/Sources/BackStackContainer.swift | 1 + Samples/BackStackContainer/Sources/BackStackScreen.swift | 1 + .../Sources/ScreenWrapperViewController.swift | 1 + Samples/SampleApp/Sources/CrossFadeContainer.swift | 1 + Samples/SampleApp/Sources/DemoScreen.swift | 1 + Samples/SampleApp/Sources/DemoWorkflow.swift | 1 + Samples/SampleApp/Sources/WelcomeScreen.swift | 1 + Samples/SplitScreenContainer/DemoApp/BarScreen.swift | 1 + Samples/SplitScreenContainer/DemoApp/DemoWorkflow.swift | 1 + Samples/SplitScreenContainer/DemoApp/FooScreen.swift | 1 + .../SnapshotTests/SplitScreenContainerScreenSnapshotTests.swift | 2 +- .../Sources/SplitScreenContainerScreen.swift | 1 + .../Sources/SplitScreenContainerViewController.swift | 1 + Samples/TicTacToe/Sources/AppDelegate.swift | 2 +- .../Sources/Authentication/AuthenticationService.swift | 1 + Samples/TicTacToe/Sources/Authentication/LoadingScreen.swift | 1 + Samples/TicTacToe/Sources/Authentication/LoginScreen.swift | 1 + Samples/TicTacToe/Sources/Authentication/TwoFactorScreen.swift | 1 + Samples/TicTacToe/Sources/Game/ConfirmQuitScreen.swift | 1 + Samples/TicTacToe/Sources/Game/GamePlayScreen.swift | 1 + Samples/TicTacToe/Sources/Game/NewGameScreen.swift | 1 + Samples/TicTacToe/Tests/AuthenticationWorkflowTests.swift | 2 +- Samples/TicTacToe/Tests/ConfirmQuitWorkflowTests.swift | 2 +- Samples/TicTacToe/Tests/LoginWorkflowTests.swift | 2 +- Samples/TicTacToe/Tests/MainWorkflowTests.swift | 2 +- Samples/TicTacToe/Tests/RunGameWorkflowTests.swift | 2 +- Samples/TicTacToe/Tests/TakeTurnsWorkflowTests.swift | 2 +- .../WorkflowCombineSampleApp/DemoWorker.swift | 1 + .../WorkflowCombineSampleApp/DemoWorkflow.swift | 1 + .../WorkflowCombineSampleAppUnitTests/DemoWorkflowTests.swift | 2 +- 30 files changed, 30 insertions(+), 9 deletions(-) diff --git a/Samples/BackStackContainer/Sources/BackStackContainer.swift b/Samples/BackStackContainer/Sources/BackStackContainer.swift index 15b82d6c2..6293d0b72 100644 --- a/Samples/BackStackContainer/Sources/BackStackContainer.swift +++ b/Samples/BackStackContainer/Sources/BackStackContainer.swift @@ -15,6 +15,7 @@ */ import WorkflowUI +import UIKit public final class BackStackContainer: ScreenViewController>, UINavigationControllerDelegate { private let navController = UINavigationController() diff --git a/Samples/BackStackContainer/Sources/BackStackScreen.swift b/Samples/BackStackContainer/Sources/BackStackScreen.swift index be60f2231..fd2a56788 100644 --- a/Samples/BackStackContainer/Sources/BackStackScreen.swift +++ b/Samples/BackStackContainer/Sources/BackStackScreen.swift @@ -15,6 +15,7 @@ */ import WorkflowUI +import UIKit public struct BackStackScreen: Screen { var items: [Item] diff --git a/Samples/BackStackContainer/Sources/ScreenWrapperViewController.swift b/Samples/BackStackContainer/Sources/ScreenWrapperViewController.swift index f9f614bc8..1926680c9 100644 --- a/Samples/BackStackContainer/Sources/ScreenWrapperViewController.swift +++ b/Samples/BackStackContainer/Sources/ScreenWrapperViewController.swift @@ -15,6 +15,7 @@ */ import WorkflowUI +import UIKit /** Wrapper view controller for being hosted in a backstack. Handles updating the bar button items. diff --git a/Samples/SampleApp/Sources/CrossFadeContainer.swift b/Samples/SampleApp/Sources/CrossFadeContainer.swift index 0ce594507..2c2bd4827 100644 --- a/Samples/SampleApp/Sources/CrossFadeContainer.swift +++ b/Samples/SampleApp/Sources/CrossFadeContainer.swift @@ -16,6 +16,7 @@ import Workflow import WorkflowUI +import UIKit struct CrossFadeScreen: Screen { var baseScreen: AnyScreen diff --git a/Samples/SampleApp/Sources/DemoScreen.swift b/Samples/SampleApp/Sources/DemoScreen.swift index cdb6db074..3f27822a4 100644 --- a/Samples/SampleApp/Sources/DemoScreen.swift +++ b/Samples/SampleApp/Sources/DemoScreen.swift @@ -16,6 +16,7 @@ import Workflow import WorkflowUI +import UIKit struct DemoScreen: Screen { let title: String diff --git a/Samples/SampleApp/Sources/DemoWorkflow.swift b/Samples/SampleApp/Sources/DemoWorkflow.swift index c508133ae..334cb3618 100644 --- a/Samples/SampleApp/Sources/DemoWorkflow.swift +++ b/Samples/SampleApp/Sources/DemoWorkflow.swift @@ -18,6 +18,7 @@ import ReactiveSwift import Workflow import WorkflowReactiveSwift import WorkflowUI +import UIKit // MARK: Input and Output diff --git a/Samples/SampleApp/Sources/WelcomeScreen.swift b/Samples/SampleApp/Sources/WelcomeScreen.swift index 4101eedb2..8ce5bd2d5 100644 --- a/Samples/SampleApp/Sources/WelcomeScreen.swift +++ b/Samples/SampleApp/Sources/WelcomeScreen.swift @@ -16,6 +16,7 @@ import Workflow import WorkflowUI +import UIKit struct WelcomeScreen: Screen { var name: String diff --git a/Samples/SplitScreenContainer/DemoApp/BarScreen.swift b/Samples/SplitScreenContainer/DemoApp/BarScreen.swift index 51f1061a2..ffce613cf 100644 --- a/Samples/SplitScreenContainer/DemoApp/BarScreen.swift +++ b/Samples/SplitScreenContainer/DemoApp/BarScreen.swift @@ -16,6 +16,7 @@ import Workflow import WorkflowUI +import UIKit struct BarScreen: Screen { let title: String diff --git a/Samples/SplitScreenContainer/DemoApp/DemoWorkflow.swift b/Samples/SplitScreenContainer/DemoApp/DemoWorkflow.swift index 0a3d6057a..a3f757fea 100644 --- a/Samples/SplitScreenContainer/DemoApp/DemoWorkflow.swift +++ b/Samples/SplitScreenContainer/DemoApp/DemoWorkflow.swift @@ -17,6 +17,7 @@ import SplitScreenContainer import Workflow import WorkflowUI +import UIKit // MARK: Input and Output diff --git a/Samples/SplitScreenContainer/DemoApp/FooScreen.swift b/Samples/SplitScreenContainer/DemoApp/FooScreen.swift index dd4800987..228167d77 100644 --- a/Samples/SplitScreenContainer/DemoApp/FooScreen.swift +++ b/Samples/SplitScreenContainer/DemoApp/FooScreen.swift @@ -16,6 +16,7 @@ import Workflow import WorkflowUI +import UIKit struct FooScreen: Screen { let title: String diff --git a/Samples/SplitScreenContainer/SnapshotTests/SplitScreenContainerScreenSnapshotTests.swift b/Samples/SplitScreenContainer/SnapshotTests/SplitScreenContainerScreenSnapshotTests.swift index 2e835df76..06761eb68 100644 --- a/Samples/SplitScreenContainer/SnapshotTests/SplitScreenContainerScreenSnapshotTests.swift +++ b/Samples/SplitScreenContainer/SnapshotTests/SplitScreenContainerScreenSnapshotTests.swift @@ -14,7 +14,7 @@ * limitations under the License. */ -import FBSnapshotTestCase +import iOSSnapshotTestCase import Workflow import WorkflowUI import XCTest diff --git a/Samples/SplitScreenContainer/Sources/SplitScreenContainerScreen.swift b/Samples/SplitScreenContainer/Sources/SplitScreenContainerScreen.swift index 546838b84..2617790b9 100644 --- a/Samples/SplitScreenContainer/Sources/SplitScreenContainerScreen.swift +++ b/Samples/SplitScreenContainer/Sources/SplitScreenContainerScreen.swift @@ -15,6 +15,7 @@ */ import WorkflowUI +import UIKit /// A `SplitScreenContainerScreen` displays two screens side by side with a separator in between. public struct SplitScreenContainerScreen: Screen { diff --git a/Samples/SplitScreenContainer/Sources/SplitScreenContainerViewController.swift b/Samples/SplitScreenContainer/Sources/SplitScreenContainerViewController.swift index 5ee3dd6f6..424b2bcce 100644 --- a/Samples/SplitScreenContainer/Sources/SplitScreenContainerViewController.swift +++ b/Samples/SplitScreenContainer/Sources/SplitScreenContainerViewController.swift @@ -16,6 +16,7 @@ import Workflow import WorkflowUI +import UIKit internal final class SplitScreenContainerViewController: ScreenViewController { internal typealias ContainerScreen = SplitScreenContainerScreen diff --git a/Samples/TicTacToe/Sources/AppDelegate.swift b/Samples/TicTacToe/Sources/AppDelegate.swift index a3d9cd1f3..a9cc35cc8 100644 --- a/Samples/TicTacToe/Sources/AppDelegate.swift +++ b/Samples/TicTacToe/Sources/AppDelegate.swift @@ -18,7 +18,7 @@ import BackStackContainer import UIKit import WorkflowUI -@UIApplicationMain +@main class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? diff --git a/Samples/TicTacToe/Sources/Authentication/AuthenticationService.swift b/Samples/TicTacToe/Sources/Authentication/AuthenticationService.swift index b86d6d0ae..e72ef8e28 100644 --- a/Samples/TicTacToe/Sources/Authentication/AuthenticationService.swift +++ b/Samples/TicTacToe/Sources/Authentication/AuthenticationService.swift @@ -14,6 +14,7 @@ * limitations under the License. */ +import Foundation import ReactiveSwift final class AuthenticationService { diff --git a/Samples/TicTacToe/Sources/Authentication/LoadingScreen.swift b/Samples/TicTacToe/Sources/Authentication/LoadingScreen.swift index d38a5cb95..9db1ed62d 100644 --- a/Samples/TicTacToe/Sources/Authentication/LoadingScreen.swift +++ b/Samples/TicTacToe/Sources/Authentication/LoadingScreen.swift @@ -15,6 +15,7 @@ */ import WorkflowUI +import UIKit struct LoadingScreen: Screen { func viewControllerDescription(environment: ViewEnvironment) -> ViewControllerDescription { diff --git a/Samples/TicTacToe/Sources/Authentication/LoginScreen.swift b/Samples/TicTacToe/Sources/Authentication/LoginScreen.swift index c9298b058..ef43b2d03 100644 --- a/Samples/TicTacToe/Sources/Authentication/LoginScreen.swift +++ b/Samples/TicTacToe/Sources/Authentication/LoginScreen.swift @@ -16,6 +16,7 @@ import Workflow import WorkflowUI +import UIKit struct LoginScreen: Screen { var title: String diff --git a/Samples/TicTacToe/Sources/Authentication/TwoFactorScreen.swift b/Samples/TicTacToe/Sources/Authentication/TwoFactorScreen.swift index 41ca18e72..9e16a4d15 100644 --- a/Samples/TicTacToe/Sources/Authentication/TwoFactorScreen.swift +++ b/Samples/TicTacToe/Sources/Authentication/TwoFactorScreen.swift @@ -15,6 +15,7 @@ */ import WorkflowUI +import UIKit struct TwoFactorScreen: Screen { var title: String diff --git a/Samples/TicTacToe/Sources/Game/ConfirmQuitScreen.swift b/Samples/TicTacToe/Sources/Game/ConfirmQuitScreen.swift index 826d3d237..52a6328ef 100644 --- a/Samples/TicTacToe/Sources/Game/ConfirmQuitScreen.swift +++ b/Samples/TicTacToe/Sources/Game/ConfirmQuitScreen.swift @@ -16,6 +16,7 @@ import Workflow import WorkflowUI +import UIKit struct ConfirmQuitScreen: Screen { let question: String diff --git a/Samples/TicTacToe/Sources/Game/GamePlayScreen.swift b/Samples/TicTacToe/Sources/Game/GamePlayScreen.swift index 203177175..024f6bf25 100644 --- a/Samples/TicTacToe/Sources/Game/GamePlayScreen.swift +++ b/Samples/TicTacToe/Sources/Game/GamePlayScreen.swift @@ -15,6 +15,7 @@ */ import WorkflowUI +import UIKit struct GamePlayScreen: Screen { var gameState: GameState diff --git a/Samples/TicTacToe/Sources/Game/NewGameScreen.swift b/Samples/TicTacToe/Sources/Game/NewGameScreen.swift index 928144a10..b5d4e9e74 100644 --- a/Samples/TicTacToe/Sources/Game/NewGameScreen.swift +++ b/Samples/TicTacToe/Sources/Game/NewGameScreen.swift @@ -15,6 +15,7 @@ */ import WorkflowUI +import UIKit struct NewGameScreen: Screen { var playerX: String diff --git a/Samples/TicTacToe/Tests/AuthenticationWorkflowTests.swift b/Samples/TicTacToe/Tests/AuthenticationWorkflowTests.swift index 42a0ac37f..dade89f7f 100644 --- a/Samples/TicTacToe/Tests/AuthenticationWorkflowTests.swift +++ b/Samples/TicTacToe/Tests/AuthenticationWorkflowTests.swift @@ -19,7 +19,7 @@ import WorkflowReactiveSwiftTesting import WorkflowTesting import XCTest -@testable import Development_SampleTicTacToe +@testable import TicTacToe class AuthenticationWorkflowTests: XCTestCase { // MARK: Action Tests diff --git a/Samples/TicTacToe/Tests/ConfirmQuitWorkflowTests.swift b/Samples/TicTacToe/Tests/ConfirmQuitWorkflowTests.swift index b4b58a0aa..18595b1e3 100644 --- a/Samples/TicTacToe/Tests/ConfirmQuitWorkflowTests.swift +++ b/Samples/TicTacToe/Tests/ConfirmQuitWorkflowTests.swift @@ -18,7 +18,7 @@ import Workflow import WorkflowTesting import XCTest -@testable import Development_SampleTicTacToe +@testable import TicTacToe class ConfirmQuitWorkflowTests: XCTestCase { // MARK: Action Tests diff --git a/Samples/TicTacToe/Tests/LoginWorkflowTests.swift b/Samples/TicTacToe/Tests/LoginWorkflowTests.swift index e6ab6ada7..e26df9902 100644 --- a/Samples/TicTacToe/Tests/LoginWorkflowTests.swift +++ b/Samples/TicTacToe/Tests/LoginWorkflowTests.swift @@ -18,7 +18,7 @@ import Workflow import WorkflowTesting import XCTest -@testable import Development_SampleTicTacToe +@testable import TicTacToe class LoginWorkflowTests: XCTestCase { // MARK: Action Tests diff --git a/Samples/TicTacToe/Tests/MainWorkflowTests.swift b/Samples/TicTacToe/Tests/MainWorkflowTests.swift index d3c7eddbd..491ad3f62 100644 --- a/Samples/TicTacToe/Tests/MainWorkflowTests.swift +++ b/Samples/TicTacToe/Tests/MainWorkflowTests.swift @@ -20,7 +20,7 @@ import Workflow import WorkflowTesting import XCTest -@testable import Development_SampleTicTacToe +@testable import TicTacToe class MainWorkflowTests: XCTestCase { // MARK: Action Tests diff --git a/Samples/TicTacToe/Tests/RunGameWorkflowTests.swift b/Samples/TicTacToe/Tests/RunGameWorkflowTests.swift index 0b22c4e84..1339175bd 100644 --- a/Samples/TicTacToe/Tests/RunGameWorkflowTests.swift +++ b/Samples/TicTacToe/Tests/RunGameWorkflowTests.swift @@ -19,7 +19,7 @@ import Workflow import WorkflowTesting import XCTest -@testable import Development_SampleTicTacToe +@testable import TicTacToe class RunGameWorkflowTests: XCTestCase { // MARK: Action Tests diff --git a/Samples/TicTacToe/Tests/TakeTurnsWorkflowTests.swift b/Samples/TicTacToe/Tests/TakeTurnsWorkflowTests.swift index 1b479c53f..9244a6881 100644 --- a/Samples/TicTacToe/Tests/TakeTurnsWorkflowTests.swift +++ b/Samples/TicTacToe/Tests/TakeTurnsWorkflowTests.swift @@ -18,7 +18,7 @@ import Workflow import WorkflowTesting import XCTest -@testable import Development_SampleTicTacToe +@testable import TicTacToe class TakeTurnsWorkflowTests: XCTestCase { // MARK: Action Tests diff --git a/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleApp/DemoWorker.swift b/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleApp/DemoWorker.swift index 509f245e4..e9e651160 100644 --- a/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleApp/DemoWorker.swift +++ b/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleApp/DemoWorker.swift @@ -6,6 +6,7 @@ // import Combine +import Foundation import Workflow import WorkflowCombine diff --git a/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleApp/DemoWorkflow.swift b/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleApp/DemoWorkflow.swift index cecbcad0f..bbfe4eed1 100644 --- a/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleApp/DemoWorkflow.swift +++ b/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleApp/DemoWorkflow.swift @@ -5,6 +5,7 @@ // Created by Soo Rin Park on 10/28/21. // +import Foundation import Workflow import WorkflowUI diff --git a/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleAppUnitTests/DemoWorkflowTests.swift b/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleAppUnitTests/DemoWorkflowTests.swift index 1ee01c4fb..95030f1f9 100644 --- a/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleAppUnitTests/DemoWorkflowTests.swift +++ b/Samples/WorkflowCombineSampleApp/WorkflowCombineSampleAppUnitTests/DemoWorkflowTests.swift @@ -9,7 +9,7 @@ import Combine import Workflow import WorkflowTesting import XCTest -@testable import Development_WorkflowCombineSampleApp +@testable import WorkflowCombineSampleApp class DemoWorkflowTests: XCTestCase { func test_demoWorkflow_publishesNewDate() { From 16e6c4608b9d9e3fbe74fb834563c5a5f853faff Mon Sep 17 00:00:00 2001 From: Andrew Watt Date: Tue, 3 Sep 2024 18:19:33 -0700 Subject: [PATCH 04/11] remove unneeded asset stubs --- .../AppIcon.appiconset/Contents.json | 98 ------------------- .../Resources/Assets.xcassets/Contents.json | 6 -- .../Base.lproj/LaunchScreen.storyboard | 25 ----- .../AppIcon.appiconset/Contents.json | 98 ------------------- .../Resources/Assets.xcassets/Contents.json | 6 -- .../Base.lproj/LaunchScreen.storyboard | 25 ----- 6 files changed, 258 deletions(-) delete mode 100644 Samples/SampleApp/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json delete mode 100644 Samples/SampleApp/Resources/Assets.xcassets/Contents.json delete mode 100644 Samples/SampleApp/Resources/Base.lproj/LaunchScreen.storyboard delete mode 100644 Samples/TicTacToe/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json delete mode 100644 Samples/TicTacToe/Resources/Assets.xcassets/Contents.json delete mode 100644 Samples/TicTacToe/Resources/Base.lproj/LaunchScreen.storyboard diff --git a/Samples/SampleApp/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json b/Samples/SampleApp/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index d8db8d65f..000000000 --- a/Samples/SampleApp/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "images" : [ - { - "idiom" : "iphone", - "size" : "20x20", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "20x20", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "3x" - }, - { - "idiom" : "ipad", - "size" : "20x20", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "20x20", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "29x29", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "29x29", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "40x40", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "40x40", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "76x76", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "76x76", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "83.5x83.5", - "scale" : "2x" - }, - { - "idiom" : "ios-marketing", - "size" : "1024x1024", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/Samples/SampleApp/Resources/Assets.xcassets/Contents.json b/Samples/SampleApp/Resources/Assets.xcassets/Contents.json deleted file mode 100644 index da4a164c9..000000000 --- a/Samples/SampleApp/Resources/Assets.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/Samples/SampleApp/Resources/Base.lproj/LaunchScreen.storyboard b/Samples/SampleApp/Resources/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index bfa361294..000000000 --- a/Samples/SampleApp/Resources/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Samples/TicTacToe/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json b/Samples/TicTacToe/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index d8db8d65f..000000000 --- a/Samples/TicTacToe/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "images" : [ - { - "idiom" : "iphone", - "size" : "20x20", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "20x20", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "3x" - }, - { - "idiom" : "ipad", - "size" : "20x20", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "20x20", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "29x29", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "29x29", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "40x40", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "40x40", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "76x76", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "76x76", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "83.5x83.5", - "scale" : "2x" - }, - { - "idiom" : "ios-marketing", - "size" : "1024x1024", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/Samples/TicTacToe/Resources/Assets.xcassets/Contents.json b/Samples/TicTacToe/Resources/Assets.xcassets/Contents.json deleted file mode 100644 index da4a164c9..000000000 --- a/Samples/TicTacToe/Resources/Assets.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/Samples/TicTacToe/Resources/Base.lproj/LaunchScreen.storyboard b/Samples/TicTacToe/Resources/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index bfa361294..000000000 --- a/Samples/TicTacToe/Resources/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - From 12df01b41f5a91c5accd07920334b37cf307be44 Mon Sep 17 00:00:00 2001 From: Andrew Watt Date: Tue, 3 Sep 2024 19:02:06 -0700 Subject: [PATCH 05/11] remove sample pod defs --- Samples/AlertContainer/AlertContainer.podspec | 20 --------- .../BackStackContainer.podspec | 20 --------- Samples/Dummy.swift | 0 Samples/ModalContainer/ModalContainer.podspec | 20 --------- Samples/SampleApp/Podfile | 13 ------ .../SplitScreenContainer.podspec | 41 ------------------- 6 files changed, 114 deletions(-) delete mode 100644 Samples/AlertContainer/AlertContainer.podspec delete mode 100644 Samples/BackStackContainer/BackStackContainer.podspec delete mode 100644 Samples/Dummy.swift delete mode 100644 Samples/ModalContainer/ModalContainer.podspec delete mode 100644 Samples/SampleApp/Podfile delete mode 100644 Samples/SplitScreenContainer/SplitScreenContainer.podspec diff --git a/Samples/AlertContainer/AlertContainer.podspec b/Samples/AlertContainer/AlertContainer.podspec deleted file mode 100644 index 2d8eaa15b..000000000 --- a/Samples/AlertContainer/AlertContainer.podspec +++ /dev/null @@ -1,20 +0,0 @@ -Pod::Spec.new do |s| - s.name = 'AlertContainer' - s.version = '1.0.0.LOCAL' - s.summary = 'See the README.' - s.homepage = 'https://www.github.com/square/workflow-swift' - s.license = 'Apache License, Version 2.0' - s.author = 'Square' - s.source = { git: 'Not Published', tag: "podify/#{s.version}" } - - # 1.7 is needed for `swift_versions` support - s.cocoapods_version = '>= 1.7.0' - - s.swift_versions = [WORKFLOW_SWIFT_VERSION] - s.ios.deployment_target = WORKFLOW_IOS_DEPLOYMENT_TARGET - - s.source_files = 'Sources/**/*.swift' - - s.dependency 'WorkflowUI' - -end diff --git a/Samples/BackStackContainer/BackStackContainer.podspec b/Samples/BackStackContainer/BackStackContainer.podspec deleted file mode 100644 index 6fcf27692..000000000 --- a/Samples/BackStackContainer/BackStackContainer.podspec +++ /dev/null @@ -1,20 +0,0 @@ -Pod::Spec.new do |s| - s.name = 'BackStackContainer' - s.version = '1.0.0.LOCAL' - s.summary = 'See the README.' - s.homepage = 'https://github.com/square/workflow-swift' - s.license = 'Apache License, Version 2.0' - s.author = 'Square' - s.source = { git: 'Not Published', tag: "podify/#{s.version}" } - - # 1.7 is needed for `swift_versions` support - s.cocoapods_version = '>= 1.7.0' - - s.swift_versions = [WORKFLOW_SWIFT_VERSION] - s.ios.deployment_target = WORKFLOW_IOS_DEPLOYMENT_TARGET - - s.source_files = 'Sources/**/*.{swift}' - - s.dependency 'WorkflowUI' - -end diff --git a/Samples/Dummy.swift b/Samples/Dummy.swift deleted file mode 100644 index e69de29bb..000000000 diff --git a/Samples/ModalContainer/ModalContainer.podspec b/Samples/ModalContainer/ModalContainer.podspec deleted file mode 100644 index 95e67436d..000000000 --- a/Samples/ModalContainer/ModalContainer.podspec +++ /dev/null @@ -1,20 +0,0 @@ -Pod::Spec.new do |s| - s.name = 'ModalContainer' - s.version = '1.0.0.LOCAL' - s.summary = 'See the README.' - s.homepage = 'https://www.github.com/square/workflow-swift' - s.license = 'Apache License, Version 2.0' - s.author = 'Square' - s.source = { git: 'Not Published', tag: "podify/#{s.version}" } - - # 1.7 is needed for `swift_versions` support - s.cocoapods_version = '>= 1.7.0' - - s.swift_versions = [WORKFLOW_SWIFT_VERSION] - s.ios.deployment_target = WORKFLOW_IOS_DEPLOYMENT_TARGET - - s.source_files = 'Sources/**/*.swift' - - s.dependency 'WorkflowUI' - -end diff --git a/Samples/SampleApp/Podfile b/Samples/SampleApp/Podfile deleted file mode 100644 index a53c5c107..000000000 --- a/Samples/SampleApp/Podfile +++ /dev/null @@ -1,13 +0,0 @@ -project 'SampleApp.xcodeproj' -platform :ios, '14.0' - -target 'SampleApp' do - pod 'Workflow', path: '../../Workflow.podspec', :testspecs => ['Tests'] - pod 'WorkflowUI', path: '../../WorkflowUI.podspec', :testspecs => ['Tests'] -end - -target 'SampleAppTests' do - pod 'Workflow', path: '../../Workflow.podspec', :testspecs => ['Tests'] - pod 'WorkflowUI', path: '../../WorkflowUI.podspec', :testspecs => ['Tests'] - pod 'WorkflowTesting', path: '../../WorkflowTesting.podspec', :testspecs => ['Tests'] -end diff --git a/Samples/SplitScreenContainer/SplitScreenContainer.podspec b/Samples/SplitScreenContainer/SplitScreenContainer.podspec deleted file mode 100644 index d9a6092c2..000000000 --- a/Samples/SplitScreenContainer/SplitScreenContainer.podspec +++ /dev/null @@ -1,41 +0,0 @@ -Pod::Spec.new do |s| - s.name = 'SplitScreenContainer' - s.version = '1.0.0.LOCAL' - s.summary = 'See the README.' - s.homepage = 'https://www.github.com/square/workflow-swift' - s.license = 'Apache License, Version 2.0' - s.author = 'Square' - s.source = { git: 'Not Published', tag: "podify/#{s.version}" } - - # 1.7 is needed for `swift_versions` support - s.cocoapods_version = '>= 1.7.0' - - s.swift_versions = [WORKFLOW_SWIFT_VERSION] - s.ios.deployment_target = WORKFLOW_IOS_DEPLOYMENT_TARGET - - s.source_files = 'Sources/**/*.swift' - - s.dependency 'Workflow' - s.dependency 'WorkflowUI' - - s.app_spec 'DemoApp' do |app_spec| - app_spec.source_files = 'DemoApp/**/*.swift' - end - - s.test_spec 'SnapshotTests' do |test_spec| - test_spec.requires_app_host = true - test_spec.source_files = 'SnapshotTests/**/*.swift' - - test_spec.framework = 'XCTest' - - test_spec.dependency 'iOSSnapshotTestCase' - - test_spec.scheme = { - environment_variables: { - 'FB_REFERENCE_IMAGE_DIR' => '$PODS_TARGET_SRCROOT/SnapshotTests/ReferenceImages', - 'IMAGE_DIFF_DIR' => '$PODS_TARGET_SRCROOT/SnapshotTests/FailureDiffs' - } - } - end - -end From 92e362a1f4f3eb2c34f0042b89562cd09f96aaed Mon Sep 17 00:00:00 2001 From: Andrew Watt Date: Tue, 3 Sep 2024 19:02:31 -0700 Subject: [PATCH 06/11] remove xcodegen --- project.yml | 102 ---------------------------------------------------- 1 file changed, 102 deletions(-) delete mode 100644 project.yml diff --git a/project.yml b/project.yml deleted file mode 100644 index fb496e4ad..000000000 --- a/project.yml +++ /dev/null @@ -1,102 +0,0 @@ -name: Workflow -options: - bundleIdPrefix: com.squareup.workflow - createIntermediateGroups: true - deploymentTarget: - iOS: 15.0 -packages: - Workflow: - path: "." -targets: - ObservableScreen: - platform: iOS - type: application - sources: - - Samples/ObservableScreen/Sources - dependencies: - - package: Workflow - products: [WorkflowSwiftUI] - info: - path: Samples/ObservableScreen/App/Info.plist - properties: - UILaunchScreen: - UIColorName: "" - - # This is a scheme for all tests except for macros. - Tests-iOS: - platform: iOS - type: bundle.unit-test - info: - path: TestingSupport/AppHost/App/Info.plist - settings: - CODE_SIGN_IDENTITY: "" - scheme: - testTargets: - - package: Workflow/WorkflowCombineTestingTests - - package: Workflow/WorkflowCombineTests - - package: Workflow/WorkflowConcurrencyTestingTests - - package: Workflow/WorkflowConcurrencyTests - - package: Workflow/WorkflowReactiveSwiftTestingTests - - package: Workflow/WorkflowReactiveSwiftTests - - package: Workflow/WorkflowRxSwiftTestingTests - - package: Workflow/WorkflowRxSwiftTests - - package: Workflow/WorkflowSwiftUIExperimentalTests - - package: Workflow/WorkflowSwiftUITests - - package: Workflow/WorkflowTestingTests - - package: Workflow/WorkflowTests - - package: Workflow/WorkflowUITests - - Tests-All: - platform: iOS - type: bundle.unit-test - info: - path: TestingSupport/AppHost/App/Info.plist - settings: - CODE_SIGN_IDENTITY: "" - scheme: - testTargets: - - package: Workflow/WorkflowCombineTestingTests - - package: Workflow/WorkflowCombineTests - - package: Workflow/WorkflowConcurrencyTestingTests - - package: Workflow/WorkflowConcurrencyTests - - package: Workflow/WorkflowReactiveSwiftTestingTests - - package: Workflow/WorkflowReactiveSwiftTests - - package: Workflow/WorkflowRxSwiftTestingTests - - package: Workflow/WorkflowRxSwiftTests - - package: Workflow/WorkflowSwiftUIExperimentalTests - - package: Workflow/WorkflowSwiftUIMacrosTests - - package: Workflow/WorkflowSwiftUITests - - package: Workflow/WorkflowTestingTests - - package: Workflow/WorkflowTests - - package: Workflow/WorkflowUITests - - # to add app-hosted test targets: - - # ViewEnvironmentUI-Tests: - # type: bundle.unit-test - # platform: iOS - # sources: ViewEnvironmentUI/Tests - # settings: - # GENERATE_INFOPLIST_FILE: true - # TEST_HOST: $(BUILT_PRODUCTS_DIR)/ViewEnvironmentUI-TestAppHost.app/ViewEnvironmentUI-TestAppHost - # BUNDLE_LOADER: $(BUILT_PRODUCTS_DIR)/ViewEnvironmentUI-TestAppHost.app/ViewEnvironmentUI-TestAppHost - # dependencies: - # - package: Workflow - # products: [ViewEnvironmentUI] - # - target: ViewEnvironmentUI-TestAppHost - # scheme: - # testTargets: - # - ViewEnvironmentUI-Tests - - # ViewEnvironmentUI-TestAppHost: - # platform: iOS - # type: application - # sources: TestingSupport/AppHost/Sources - # dependencies: - # - package: Workflow - # products: [ViewEnvironmentUI] - # info: - # path: TestingSupport/AppHost/App/Info.plist - # properties: - # UILaunchScreen: - # UIColorName: "" \ No newline at end of file From a7286f6557d3a64a52ba36ab5d3a9694b6fb10b2 Mon Sep 17 00:00:00 2001 From: Andrew Watt Date: Fri, 6 Sep 2024 16:07:47 -0700 Subject: [PATCH 07/11] unsuppress warnings --- Samples/Tuist/Package.swift | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/Samples/Tuist/Package.swift b/Samples/Tuist/Package.swift index 346d00577..91c88604a 100644 --- a/Samples/Tuist/Package.swift +++ b/Samples/Tuist/Package.swift @@ -5,6 +5,11 @@ import PackageDescription #if TUIST import ProjectDescription +let unsuppressedWarningsSettings: SettingsDictionary = [ + "GCC_WARN_INHIBIT_ALL_WARNINGS": "$(inherited)", + "SWIFT_SUPPRESS_WARNINGS": "$(inherited)", +] + let packageSettings = PackageSettings( productTypes: [ "ViewEnvironmentUI": .framework, @@ -15,7 +20,21 @@ let packageSettings = PackageSettings( "iOSSnapshotTestCase": .framework ], targetSettings: [ - "iOSSnapshotTestCase": ["ENABLE_TESTING_SEARCH_PATHS": "YES"] + "iOSSnapshotTestCase": ["ENABLE_TESTING_SEARCH_PATHS": "YES"], + "ViewEnvironment": unsuppressedWarningsSettings, + "ViewEnvironmentUI": unsuppressedWarningsSettings, + "Workflow": unsuppressedWarningsSettings, + "WorkflowCombine": unsuppressedWarningsSettings, + "WorkflowCombineTesting": unsuppressedWarningsSettings, + "WorkflowConcurrency": unsuppressedWarningsSettings, + "WorkflowConcurrencyTesting": unsuppressedWarningsSettings, + "WorkflowReactiveSwift": unsuppressedWarningsSettings, + "WorkflowReactiveSwiftTesting": unsuppressedWarningsSettings, + "WorkflowRxSwift": unsuppressedWarningsSettings, + "WorkflowRxSwiftTesting": unsuppressedWarningsSettings, + "WorkflowSwiftUIExperimental": unsuppressedWarningsSettings, + "WorkflowTesting": unsuppressedWarningsSettings, + "WorkflowUI": unsuppressedWarningsSettings, ] ) From d126f61f3ad00e0ee33e8a859ee4a0d8edca10a0 Mon Sep 17 00:00:00 2001 From: Andrew Watt Date: Mon, 9 Sep 2024 17:36:46 -0700 Subject: [PATCH 08/11] tutorial --- .github/workflows/swift.yaml | 20 +- Samples/Project.swift | 70 +-- Samples/Tuist/Package.swift | 7 +- .../Project+Workflow.swift | 70 +++ Samples/Tutorial/.gitignore | 3 +- .../Tutorial/AppHost/Configuration/Info.plist | 47 -- .../AppIcon.appiconset/Contents.json | 98 --- .../Resources/Assets.xcassets/Contents.json | 6 - .../Base.lproj/LaunchScreen.storyboard | 25 - .../Tutorial/AppHost/TutorialTests/Info.plist | 22 - .../AppHost/TutorialTests/TutorialTests.swift | 21 - .../Edit/TodoEditSampleViewController.swift | 1 + .../List/TodoListSampleViewController.swift | 1 + .../Tutorial1Complete/Tutorial1.podspec | 23 - .../Edit/TodoEditSampleViewController.swift | 1 + .../Tutorial2Complete/Tutorial2.podspec | 23 - .../Tutorial3Complete/Tutorial3.podspec | 24 - .../Tutorial4Complete/Tutorial4.podspec | 30 - .../Tests/RootWorkflowTests.swift | 2 +- .../Tests/TodoEditWorkflowTests.swift | 2 +- .../Tests/TodoListWorkflowTests.swift | 2 +- .../Tests/TodoWorkflowTests.swift | 2 +- .../Tests/WelcomeWorkflowTests.swift | 2 +- .../Tutorial5Complete/Tutorial5.podspec | 31 - .../Edit/TodoEditSampleViewController.swift | 1 + .../List/TodoListSampleViewController.swift | 1 + .../Welcome/WelcomeSampleViewController.swift | 1 + .../TutorialBase/TutorialBase.podspec | 30 - .../TutorialViews/TutorialViews.podspec | 17 - Samples/Tutorial/Podfile | 25 - Samples/Tutorial/Project.swift | 121 ++++ Samples/Tutorial/README.md | 36 +- .../Tutorial.xcodeproj/project.pbxproj | 575 ------------------ .../contents.xcworkspacedata | 7 - .../xcshareddata/IDEWorkspaceChecks.plist | 8 - .../xcshareddata/xcschemes/Tutorial.xcscheme | 127 ---- .../contents.xcworkspacedata | 10 - .../xcshareddata/IDEWorkspaceChecks.plist | 8 - Samples/Tutorial/Tutorial1.md | 6 +- Samples/Tutorial/Tutorial2.md | 4 +- Samples/Tutorial/Tutorial3.md | 4 +- Samples/Tutorial/Tutorial4.md | 4 +- Samples/Tutorial/Tutorial5.md | 4 +- Samples/Workspace.swift | 6 + 44 files changed, 256 insertions(+), 1272 deletions(-) create mode 100644 Samples/Tuist/ProjectDescriptionHelpers/Project+Workflow.swift delete mode 100644 Samples/Tutorial/AppHost/Configuration/Info.plist delete mode 100644 Samples/Tutorial/AppHost/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json delete mode 100644 Samples/Tutorial/AppHost/Resources/Assets.xcassets/Contents.json delete mode 100644 Samples/Tutorial/AppHost/Resources/Base.lproj/LaunchScreen.storyboard delete mode 100644 Samples/Tutorial/AppHost/TutorialTests/Info.plist delete mode 100644 Samples/Tutorial/AppHost/TutorialTests/TutorialTests.swift delete mode 100644 Samples/Tutorial/Frameworks/Tutorial1Complete/Tutorial1.podspec delete mode 100644 Samples/Tutorial/Frameworks/Tutorial2Complete/Tutorial2.podspec delete mode 100644 Samples/Tutorial/Frameworks/Tutorial3Complete/Tutorial3.podspec delete mode 100644 Samples/Tutorial/Frameworks/Tutorial4Complete/Tutorial4.podspec delete mode 100644 Samples/Tutorial/Frameworks/Tutorial5Complete/Tutorial5.podspec delete mode 100644 Samples/Tutorial/Frameworks/TutorialBase/TutorialBase.podspec delete mode 100644 Samples/Tutorial/Frameworks/TutorialViews/TutorialViews.podspec delete mode 100644 Samples/Tutorial/Podfile create mode 100644 Samples/Tutorial/Project.swift delete mode 100644 Samples/Tutorial/Tutorial.xcodeproj/project.pbxproj delete mode 100644 Samples/Tutorial/Tutorial.xcodeproj/project.xcworkspace/contents.xcworkspacedata delete mode 100644 Samples/Tutorial/Tutorial.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 Samples/Tutorial/Tutorial.xcodeproj/xcshareddata/xcschemes/Tutorial.xcscheme delete mode 100644 Samples/Tutorial/Tutorial.xcworkspace/contents.xcworkspacedata delete mode 100644 Samples/Tutorial/Tutorial.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 Samples/Workspace.swift diff --git a/.github/workflows/swift.yaml b/.github/workflows/swift.yaml index 2f763ba3f..7ac8e5773 100644 --- a/.github/workflows/swift.yaml +++ b/.github/workflows/swift.yaml @@ -117,26 +117,16 @@ jobs: steps: - uses: actions/checkout@v4 - - - name: Setup Ruby - uses: ruby/setup-ruby@v1 - with: - # Uses version specified in .ruby_version - bundler-cache: true # runs 'bundle install' and caches installed gems automatically + - uses: jdx/mise-action@v2 - name: Switch Xcode run: sudo xcode-select -s /Applications/Xcode_${XCODE_VERSION}.app + - name: Install dependencies + run: tuist install --path Samples/Tutorial + - name: Tutorial App - run: | - cd Samples/Tutorial - bundle exec pod install - set -o pipefail - xcodebuild \ - -workspace Tutorial.xcworkspace \ - -scheme Tutorial \ - -destination "$IOS_DESTINATION" \ - build test | bundle exec xcpretty + run: tuist test --path Samples/Tutorial TutorialTests documentation-lint: runs-on: macos-latest diff --git a/Samples/Project.swift b/Samples/Project.swift index 68f0cda0b..f6808a16b 100644 --- a/Samples/Project.swift +++ b/Samples/Project.swift @@ -1,74 +1,8 @@ import Foundation import ProjectDescription - -let workflowBundleIdPrefix = "com.squareup.workflow" -let workflowDestinations: ProjectDescription.Destinations = .iOS -let workflowDeploymentTargets: DeploymentTargets = .iOS("15.0") +import ProjectDescriptionHelpers extension Target { - - static func app( - name: String, - sources: ProjectDescription.SourceFilesList, - resources: ProjectDescription.ResourceFileElements? = nil, - dependencies: [TargetDependency] = [] - ) -> Self { - .target( - name: name, - destinations: workflowDestinations, - product: .app, - bundleId: "\(workflowBundleIdPrefix).\(name)", - deploymentTargets: workflowDeploymentTargets, - infoPlist: .extendingDefault( - with: [ - "UILaunchScreen": ["UIColorName": ""], - ] - ), - sources: sources, - resources: resources, - dependencies: dependencies - ) - } - - static func target( - name: String, - sources: ProjectDescription.SourceFilesList? = nil, - resources: ProjectDescription.ResourceFileElements? = nil, - dependencies: [TargetDependency] = [] - ) -> Self { - .target( - name: name, - destinations: workflowDestinations, - product: .framework, - bundleId: "\(workflowBundleIdPrefix).\(name)", - deploymentTargets: workflowDeploymentTargets, - sources: sources ?? "\(name)/Sources/**", - resources: resources, - dependencies: dependencies - ) - } - - static func unitTest( - for moduleUnderTest: String, - testName: String = "Tests", - sources: ProjectDescription.SourceFilesList? = nil, - dependencies: [TargetDependency] = [], - environmentVariables: [String : EnvironmentVariable] = [:] - ) -> Self { - let name = "\(moduleUnderTest)-\(testName)" - return .target( - name: name, - destinations: workflowDestinations, - product: .unitTests, - bundleId: "\(workflowBundleIdPrefix).\(name)", - deploymentTargets: workflowDeploymentTargets, - sources: sources ?? "\(moduleUnderTest)/\(testName)/**", - dependencies: dependencies, - environmentVariables: environmentVariables - - ) - } - static func snapshotTest( for moduleUnderTest: String, testName: String = "SnapshotTests", @@ -173,8 +107,6 @@ let project = Project( ] ), - // TODO: Tutorial has a dedicated xcodeproj - .app( name: "WorkflowCombineSampleApp", sources: "WorkflowCombineSampleApp/WorkflowCombineSampleApp/**", diff --git a/Samples/Tuist/Package.swift b/Samples/Tuist/Package.swift index 91c88604a..ca224456d 100644 --- a/Samples/Tuist/Package.swift +++ b/Samples/Tuist/Package.swift @@ -12,12 +12,13 @@ let unsuppressedWarningsSettings: SettingsDictionary = [ let packageSettings = PackageSettings( productTypes: [ - "ViewEnvironmentUI": .framework, + "iOSSnapshotTestCase": .framework, + "ReactiveSwift": .framework, "ViewEnvironment": .framework, + "ViewEnvironmentUI": .framework, "Workflow": .framework, + "WorkflowReactiveSwift": .framework, "WorkflowUI": .framework, - "ReactiveSwift": .framework, - "iOSSnapshotTestCase": .framework ], targetSettings: [ "iOSSnapshotTestCase": ["ENABLE_TESTING_SEARCH_PATHS": "YES"], diff --git a/Samples/Tuist/ProjectDescriptionHelpers/Project+Workflow.swift b/Samples/Tuist/ProjectDescriptionHelpers/Project+Workflow.swift new file mode 100644 index 000000000..db4398bfc --- /dev/null +++ b/Samples/Tuist/ProjectDescriptionHelpers/Project+Workflow.swift @@ -0,0 +1,70 @@ +import Foundation +import ProjectDescription + +public let workflowBundleIdPrefix = "com.squareup.workflow" +public let workflowDestinations: ProjectDescription.Destinations = .iOS +public let workflowDeploymentTargets: DeploymentTargets = .iOS("15.0") + +extension Target { + + public static func app( + name: String, + sources: ProjectDescription.SourceFilesList, + resources: ProjectDescription.ResourceFileElements? = nil, + dependencies: [TargetDependency] = [] + ) -> Self { + .target( + name: name, + destinations: workflowDestinations, + product: .app, + bundleId: "\(workflowBundleIdPrefix).\(name)", + deploymentTargets: workflowDeploymentTargets, + infoPlist: .extendingDefault( + with: [ + "UILaunchScreen": ["UIColorName": ""], + ] + ), + sources: sources, + resources: resources, + dependencies: dependencies + ) + } + + public static func target( + name: String, + sources: ProjectDescription.SourceFilesList? = nil, + resources: ProjectDescription.ResourceFileElements? = nil, + dependencies: [TargetDependency] = [] + ) -> Self { + .target( + name: name, + destinations: workflowDestinations, + product: .framework, + bundleId: "\(workflowBundleIdPrefix).\(name)", + deploymentTargets: workflowDeploymentTargets, + sources: sources ?? "\(name)/Sources/**", + resources: resources, + dependencies: dependencies + ) + } + + public static func unitTest( + for moduleUnderTest: String, + testName: String = "Tests", + sources: ProjectDescription.SourceFilesList? = nil, + dependencies: [TargetDependency] = [], + environmentVariables: [String : EnvironmentVariable] = [:] + ) -> Self { + let name = "\(moduleUnderTest)-\(testName)" + return .target( + name: name, + destinations: workflowDestinations, + product: .unitTests, + bundleId: "\(workflowBundleIdPrefix).\(name)", + deploymentTargets: workflowDeploymentTargets, + sources: sources ?? "\(moduleUnderTest)/\(testName)/**", + dependencies: dependencies, + environmentVariables: environmentVariables + ) + } +} diff --git a/Samples/Tutorial/.gitignore b/Samples/Tutorial/.gitignore index 05ef11923..44831e577 100644 --- a/Samples/Tutorial/.gitignore +++ b/Samples/Tutorial/.gitignore @@ -1 +1,2 @@ -Podfile.lock +/Tutorial.xcodeproj +/Tutorial.xcworkspace diff --git a/Samples/Tutorial/AppHost/Configuration/Info.plist b/Samples/Tutorial/AppHost/Configuration/Info.plist deleted file mode 100644 index f0b505750..000000000 --- a/Samples/Tutorial/AppHost/Configuration/Info.plist +++ /dev/null @@ -1,47 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - CFBundleDisplayName - - LSApplicationCategoryType - - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/Samples/Tutorial/AppHost/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json b/Samples/Tutorial/AppHost/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index d8db8d65f..000000000 --- a/Samples/Tutorial/AppHost/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "images" : [ - { - "idiom" : "iphone", - "size" : "20x20", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "20x20", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "3x" - }, - { - "idiom" : "ipad", - "size" : "20x20", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "20x20", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "29x29", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "29x29", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "40x40", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "40x40", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "76x76", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "76x76", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "83.5x83.5", - "scale" : "2x" - }, - { - "idiom" : "ios-marketing", - "size" : "1024x1024", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/Samples/Tutorial/AppHost/Resources/Assets.xcassets/Contents.json b/Samples/Tutorial/AppHost/Resources/Assets.xcassets/Contents.json deleted file mode 100644 index da4a164c9..000000000 --- a/Samples/Tutorial/AppHost/Resources/Assets.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/Samples/Tutorial/AppHost/Resources/Base.lproj/LaunchScreen.storyboard b/Samples/Tutorial/AppHost/Resources/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index bfa361294..000000000 --- a/Samples/Tutorial/AppHost/Resources/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - 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/Tutorial/AppHost/TutorialTests/TutorialTests.swift b/Samples/Tutorial/AppHost/TutorialTests/TutorialTests.swift deleted file mode 100644 index 7f496fc2e..000000000 --- a/Samples/Tutorial/AppHost/TutorialTests/TutorialTests.swift +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright 2020 Square Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import XCTest - -class TutorialTests: XCTestCase { - func testExample() {} -} diff --git a/Samples/Tutorial/Frameworks/Tutorial1Complete/Sources/Todo/Edit/TodoEditSampleViewController.swift b/Samples/Tutorial/Frameworks/Tutorial1Complete/Sources/Todo/Edit/TodoEditSampleViewController.swift index 17e596b7f..57828dc50 100644 --- a/Samples/Tutorial/Frameworks/Tutorial1Complete/Sources/Todo/Edit/TodoEditSampleViewController.swift +++ b/Samples/Tutorial/Frameworks/Tutorial1Complete/Sources/Todo/Edit/TodoEditSampleViewController.swift @@ -15,6 +15,7 @@ */ import TutorialViews +import UIKit final class TodoEditSampleViewController: UIViewController { let todoEditView: TodoEditView diff --git a/Samples/Tutorial/Frameworks/Tutorial1Complete/Sources/Todo/List/TodoListSampleViewController.swift b/Samples/Tutorial/Frameworks/Tutorial1Complete/Sources/Todo/List/TodoListSampleViewController.swift index c0b40e0c1..711141c77 100644 --- a/Samples/Tutorial/Frameworks/Tutorial1Complete/Sources/Todo/List/TodoListSampleViewController.swift +++ b/Samples/Tutorial/Frameworks/Tutorial1Complete/Sources/Todo/List/TodoListSampleViewController.swift @@ -15,6 +15,7 @@ */ import TutorialViews +import UIKit final class TodoListSampleViewController: UIViewController { let todoListView: TodoListView diff --git a/Samples/Tutorial/Frameworks/Tutorial1Complete/Tutorial1.podspec b/Samples/Tutorial/Frameworks/Tutorial1Complete/Tutorial1.podspec deleted file mode 100644 index a47d21ef4..000000000 --- a/Samples/Tutorial/Frameworks/Tutorial1Complete/Tutorial1.podspec +++ /dev/null @@ -1,23 +0,0 @@ -Pod::Spec.new do |s| - s.name = 'Tutorial1' - s.version = '1.0.0.LOCAL' - s.summary = 'See the README.' - s.homepage = 'https://github.com/square/workflow-swift' - s.license = 'Apache License, Version 2.0' - s.author = 'Square' - s.source = { git: 'Not Published', tag: "podify/#{s.version}" } - - # 1.7 is needed for `swift_versions` support - s.cocoapods_version = '>= 1.7.0' - - s.swift_versions = [WORKFLOW_SWIFT_VERSION] - s.ios.deployment_target = WORKFLOW_IOS_DEPLOYMENT_TARGET - - s.source_files = 'Sources/**/*.swift' - - s.dependency 'TutorialViews' - s.dependency 'Workflow' - s.dependency 'WorkflowUI' - s.dependency 'WorkflowReactiveSwift' - s.dependency 'BackStackContainer' -end diff --git a/Samples/Tutorial/Frameworks/Tutorial2Complete/Sources/Todo/Edit/TodoEditSampleViewController.swift b/Samples/Tutorial/Frameworks/Tutorial2Complete/Sources/Todo/Edit/TodoEditSampleViewController.swift index 17e596b7f..57828dc50 100644 --- a/Samples/Tutorial/Frameworks/Tutorial2Complete/Sources/Todo/Edit/TodoEditSampleViewController.swift +++ b/Samples/Tutorial/Frameworks/Tutorial2Complete/Sources/Todo/Edit/TodoEditSampleViewController.swift @@ -15,6 +15,7 @@ */ import TutorialViews +import UIKit final class TodoEditSampleViewController: UIViewController { let todoEditView: TodoEditView diff --git a/Samples/Tutorial/Frameworks/Tutorial2Complete/Tutorial2.podspec b/Samples/Tutorial/Frameworks/Tutorial2Complete/Tutorial2.podspec deleted file mode 100644 index b8626a6c5..000000000 --- a/Samples/Tutorial/Frameworks/Tutorial2Complete/Tutorial2.podspec +++ /dev/null @@ -1,23 +0,0 @@ -Pod::Spec.new do |s| - s.name = 'Tutorial2' - s.version = '1.0.0.LOCAL' - s.summary = 'See the README.' - s.homepage = 'https://github.com/square/workflow-swift' - s.license = 'Apache License, Version 2.0' - s.author = 'Square' - s.source = { git: 'Not Published', tag: "podify/#{s.version}" } - - # 1.7 is needed for `swift_versions` support - s.cocoapods_version = '>= 1.7.0' - - s.swift_versions = [WORKFLOW_SWIFT_VERSION] - s.ios.deployment_target = WORKFLOW_IOS_DEPLOYMENT_TARGET - - s.source_files = 'Sources/**/*.swift' - - s.dependency 'TutorialViews' - s.dependency 'Workflow' - s.dependency 'WorkflowUI' - s.dependency 'BackStackContainer' - s.dependency 'WorkflowReactiveSwift' -end diff --git a/Samples/Tutorial/Frameworks/Tutorial3Complete/Tutorial3.podspec b/Samples/Tutorial/Frameworks/Tutorial3Complete/Tutorial3.podspec deleted file mode 100644 index 01cde7900..000000000 --- a/Samples/Tutorial/Frameworks/Tutorial3Complete/Tutorial3.podspec +++ /dev/null @@ -1,24 +0,0 @@ -Pod::Spec.new do |s| - s.name = 'Tutorial3' - s.version = '1.0.0.LOCAL' - s.summary = 'See the README.' - s.homepage = 'https://github.com/square/workflow-swift' - s.license = 'Apache License, Version 2.0' - s.author = 'Square' - s.source = { git: 'Not Published', tag: "podify/#{s.version}" } - - # 1.7 is needed for `swift_versions` support - s.cocoapods_version = '>= 1.7.0' - - s.swift_versions = [WORKFLOW_SWIFT_VERSION] - s.ios.deployment_target = WORKFLOW_IOS_DEPLOYMENT_TARGET - - s.source_files = 'Sources/**/*.swift' - s.resource_bundle = { 'TutorialResources' => ['Resources/**/*'] } - - s.dependency 'TutorialViews' - s.dependency 'Workflow' - s.dependency 'WorkflowUI' - s.dependency 'BackStackContainer' - s.dependency 'WorkflowReactiveSwift' -end diff --git a/Samples/Tutorial/Frameworks/Tutorial4Complete/Tutorial4.podspec b/Samples/Tutorial/Frameworks/Tutorial4Complete/Tutorial4.podspec deleted file mode 100644 index 7aaa31987..000000000 --- a/Samples/Tutorial/Frameworks/Tutorial4Complete/Tutorial4.podspec +++ /dev/null @@ -1,30 +0,0 @@ -Pod::Spec.new do |s| - s.name = 'Tutorial4' - s.version = '1.0.0.LOCAL' - s.summary = 'See the README.' - s.homepage = 'https://github.com/square/workflow-swift' - s.license = 'Apache License, Version 2.0' - s.author = 'Square' - s.source = { git: 'Not Published', tag: "podify/#{s.version}" } - - # 1.7 is needed for `swift_versions` support - s.cocoapods_version = '>= 1.7.0' - - s.swift_versions = [WORKFLOW_SWIFT_VERSION] - s.ios.deployment_target = WORKFLOW_IOS_DEPLOYMENT_TARGET - - s.source_files = 'Sources/**/*.swift' - s.resource_bundle = { 'TutorialResources' => ['Resources/**/*'] } - - s.dependency 'TutorialViews' - s.dependency 'Workflow' - s.dependency 'WorkflowUI' - s.dependency 'BackStackContainer' - s.dependency 'WorkflowReactiveSwift' - - s.test_spec 'Tests' do |test_spec| - test_spec.source_files = 'Tests/**/*.swift' - - test_spec.framework = 'XCTest' - end -end diff --git a/Samples/Tutorial/Frameworks/Tutorial5Complete/Tests/RootWorkflowTests.swift b/Samples/Tutorial/Frameworks/Tutorial5Complete/Tests/RootWorkflowTests.swift index 66151845b..57c35a16d 100644 --- a/Samples/Tutorial/Frameworks/Tutorial5Complete/Tests/RootWorkflowTests.swift +++ b/Samples/Tutorial/Frameworks/Tutorial5Complete/Tests/RootWorkflowTests.swift @@ -19,7 +19,7 @@ import WorkflowTesting import XCTest // Import `BackStackContainer` as testable so that the items in the `BackStackScreen` can be inspected. @testable import BackStackContainer -@testable import Tutorial5 +@testable import Tutorial5Complete // Import `WorkflowUI` as testable so that the wrappedScreen in `AnyScreen` can be accessed. @testable import WorkflowUI diff --git a/Samples/Tutorial/Frameworks/Tutorial5Complete/Tests/TodoEditWorkflowTests.swift b/Samples/Tutorial/Frameworks/Tutorial5Complete/Tests/TodoEditWorkflowTests.swift index 4b89524ca..f1e382883 100644 --- a/Samples/Tutorial/Frameworks/Tutorial5Complete/Tests/TodoEditWorkflowTests.swift +++ b/Samples/Tutorial/Frameworks/Tutorial5Complete/Tests/TodoEditWorkflowTests.swift @@ -16,7 +16,7 @@ import WorkflowTesting import XCTest -@testable import Tutorial5 +@testable import Tutorial5Complete class TodoEditWorkflowTests: XCTestCase { func testAction() throws { diff --git a/Samples/Tutorial/Frameworks/Tutorial5Complete/Tests/TodoListWorkflowTests.swift b/Samples/Tutorial/Frameworks/Tutorial5Complete/Tests/TodoListWorkflowTests.swift index c036ff64d..60ae3dae8 100644 --- a/Samples/Tutorial/Frameworks/Tutorial5Complete/Tests/TodoListWorkflowTests.swift +++ b/Samples/Tutorial/Frameworks/Tutorial5Complete/Tests/TodoListWorkflowTests.swift @@ -16,7 +16,7 @@ import WorkflowTesting import XCTest -@testable import Tutorial5 +@testable import Tutorial5Complete class TodoListWorkflowTests: XCTestCase { func testActions() throws { diff --git a/Samples/Tutorial/Frameworks/Tutorial5Complete/Tests/TodoWorkflowTests.swift b/Samples/Tutorial/Frameworks/Tutorial5Complete/Tests/TodoWorkflowTests.swift index 32ddd55f1..f18b93b72 100644 --- a/Samples/Tutorial/Frameworks/Tutorial5Complete/Tests/TodoWorkflowTests.swift +++ b/Samples/Tutorial/Frameworks/Tutorial5Complete/Tests/TodoWorkflowTests.swift @@ -19,7 +19,7 @@ import Workflow import WorkflowTesting import WorkflowUI import XCTest -@testable import Tutorial5 +@testable import Tutorial5Complete class TodoWorkflowTests: XCTestCase { func testSelectingTodo() throws { diff --git a/Samples/Tutorial/Frameworks/Tutorial5Complete/Tests/WelcomeWorkflowTests.swift b/Samples/Tutorial/Frameworks/Tutorial5Complete/Tests/WelcomeWorkflowTests.swift index 96bd35a59..795572990 100644 --- a/Samples/Tutorial/Frameworks/Tutorial5Complete/Tests/WelcomeWorkflowTests.swift +++ b/Samples/Tutorial/Frameworks/Tutorial5Complete/Tests/WelcomeWorkflowTests.swift @@ -16,7 +16,7 @@ import WorkflowTesting import XCTest -@testable import Tutorial5 +@testable import Tutorial5Complete class WelcomeWorkflowTests: XCTestCase { func testNameUpdates() throws { diff --git a/Samples/Tutorial/Frameworks/Tutorial5Complete/Tutorial5.podspec b/Samples/Tutorial/Frameworks/Tutorial5Complete/Tutorial5.podspec deleted file mode 100644 index b7b7a42cb..000000000 --- a/Samples/Tutorial/Frameworks/Tutorial5Complete/Tutorial5.podspec +++ /dev/null @@ -1,31 +0,0 @@ -Pod::Spec.new do |s| - s.name = 'Tutorial5' - s.version = '1.0.0.LOCAL' - s.summary = 'See the README.' - s.homepage = 'https://github.com/square/workflow-swift' - s.license = 'Apache License, Version 2.0' - s.author = 'Square' - s.source = { git: 'Not Published', tag: "podify/#{s.version}" } - - # 1.7 is needed for `swift_versions` support - s.cocoapods_version = '>= 1.7.0' - - s.swift_versions = [WORKFLOW_SWIFT_VERSION] - s.ios.deployment_target = WORKFLOW_IOS_DEPLOYMENT_TARGET - - s.source_files = 'Sources/**/*.swift' - s.resource_bundle = { 'TutorialResources' => ['Resources/**/*'] } - - s.dependency 'TutorialViews' - s.dependency 'Workflow' - s.dependency 'WorkflowUI' - s.dependency 'BackStackContainer' - s.dependency 'WorkflowReactiveSwift' - - s.test_spec 'Tests' do |test_spec| - test_spec.source_files = 'Tests/**/*.swift' - - test_spec.framework = 'XCTest' - test_spec.dependency 'WorkflowTesting' - end -end diff --git a/Samples/Tutorial/Frameworks/TutorialBase/Sources/Todo/Edit/TodoEditSampleViewController.swift b/Samples/Tutorial/Frameworks/TutorialBase/Sources/Todo/Edit/TodoEditSampleViewController.swift index 17e596b7f..57828dc50 100644 --- a/Samples/Tutorial/Frameworks/TutorialBase/Sources/Todo/Edit/TodoEditSampleViewController.swift +++ b/Samples/Tutorial/Frameworks/TutorialBase/Sources/Todo/Edit/TodoEditSampleViewController.swift @@ -15,6 +15,7 @@ */ import TutorialViews +import UIKit final class TodoEditSampleViewController: UIViewController { let todoEditView: TodoEditView diff --git a/Samples/Tutorial/Frameworks/TutorialBase/Sources/Todo/List/TodoListSampleViewController.swift b/Samples/Tutorial/Frameworks/TutorialBase/Sources/Todo/List/TodoListSampleViewController.swift index c0b40e0c1..711141c77 100644 --- a/Samples/Tutorial/Frameworks/TutorialBase/Sources/Todo/List/TodoListSampleViewController.swift +++ b/Samples/Tutorial/Frameworks/TutorialBase/Sources/Todo/List/TodoListSampleViewController.swift @@ -15,6 +15,7 @@ */ import TutorialViews +import UIKit final class TodoListSampleViewController: UIViewController { let todoListView: TodoListView diff --git a/Samples/Tutorial/Frameworks/TutorialBase/Sources/Welcome/WelcomeSampleViewController.swift b/Samples/Tutorial/Frameworks/TutorialBase/Sources/Welcome/WelcomeSampleViewController.swift index dbd871855..439b7f99b 100644 --- a/Samples/Tutorial/Frameworks/TutorialBase/Sources/Welcome/WelcomeSampleViewController.swift +++ b/Samples/Tutorial/Frameworks/TutorialBase/Sources/Welcome/WelcomeSampleViewController.swift @@ -15,6 +15,7 @@ */ import TutorialViews +import UIKit final class WelcomeSampleViewController: UIViewController { let welcomeView: WelcomeView diff --git a/Samples/Tutorial/Frameworks/TutorialBase/TutorialBase.podspec b/Samples/Tutorial/Frameworks/TutorialBase/TutorialBase.podspec deleted file mode 100644 index fcfca2f99..000000000 --- a/Samples/Tutorial/Frameworks/TutorialBase/TutorialBase.podspec +++ /dev/null @@ -1,30 +0,0 @@ -Pod::Spec.new do |s| - s.name = 'TutorialBase' - s.version = '1.0.0.LOCAL' - s.summary = 'See the README.' - s.homepage = 'https://github.com/square/workflow-swift' - s.license = 'Apache License, Version 2.0' - s.author = 'Square' - s.source = { git: 'Not Published', tag: "podify/#{s.version}" } - - # 1.7 is needed for `swift_versions` support - s.cocoapods_version = '>= 1.7.0' - - s.swift_versions = [WORKFLOW_SWIFT_VERSION] - s.ios.deployment_target = WORKFLOW_IOS_DEPLOYMENT_TARGET - - s.source_files = 'Sources/**/*.swift' - - s.dependency 'TutorialViews' - s.dependency 'Workflow' - s.dependency 'WorkflowUI' - s.dependency 'BackStackContainer' - s.dependency 'WorkflowReactiveSwift' - - s.test_spec 'Tests' do |test_spec| - test_spec.source_files = 'Tests/**/*.swift' - test_spec.dependency 'WorkflowTesting' - - test_spec.framework = 'XCTest' - end -end diff --git a/Samples/Tutorial/Frameworks/TutorialViews/TutorialViews.podspec b/Samples/Tutorial/Frameworks/TutorialViews/TutorialViews.podspec deleted file mode 100644 index 40a137498..000000000 --- a/Samples/Tutorial/Frameworks/TutorialViews/TutorialViews.podspec +++ /dev/null @@ -1,17 +0,0 @@ -Pod::Spec.new do |s| - s.name = 'TutorialViews' - s.version = '1.0.0.LOCAL' - s.summary = 'See the README.' - s.homepage = 'https://github.com/square/workflow-swift' - s.license = 'Apache License, Version 2.0' - s.author = 'Square' - s.source = { git: 'Not Published', tag: "podify/#{s.version}" } - - # 1.7 is needed for `swift_versions` support - s.cocoapods_version = '>= 1.7.0' - - s.swift_versions = [WORKFLOW_SWIFT_VERSION] - s.ios.deployment_target = WORKFLOW_IOS_DEPLOYMENT_TARGET - - s.source_files = 'Sources/**/*.swift' -end diff --git a/Samples/Tutorial/Podfile b/Samples/Tutorial/Podfile deleted file mode 100644 index 9409132e9..000000000 --- a/Samples/Tutorial/Podfile +++ /dev/null @@ -1,25 +0,0 @@ -require_relative('../../version') - -project 'Tutorial.xcodeproj' -platform :ios, WORKFLOW_IOS_DEPLOYMENT_TARGET - -target 'Tutorial' do - pod 'Workflow', path: '../../Workflow.podspec', :testspecs => ['Tests'] - pod 'WorkflowUI', path: '../../WorkflowUI.podspec', :testspecs => ['Tests'] - pod 'ViewEnvironment', path: '../../ViewEnvironment.podspec' - pod 'ViewEnvironmentUI', path: '../../ViewEnvironmentUI.podspec', :testspecs => ['Tests'] - pod 'WorkflowReactiveSwift', path: '../../WorkflowReactiveSwift.podspec', :testspecs => ['Tests'] - pod 'BackStackContainer', path: '../BackStackContainer/BackStackContainer.podspec' - - pod 'TutorialViews', path: 'Frameworks/TutorialViews/TutorialViews.podspec' - pod 'TutorialBase', path: 'Frameworks/TutorialBase/TutorialBase.podspec', :testspecs => ['Tests'] - pod 'Tutorial1', path: 'Frameworks/Tutorial1Complete/Tutorial1.podspec' - pod 'Tutorial2', path: 'Frameworks/Tutorial2Complete/Tutorial2.podspec' - pod 'Tutorial3', path: 'Frameworks/Tutorial3Complete/Tutorial3.podspec' - pod 'Tutorial4', path: 'Frameworks/Tutorial4Complete/Tutorial4.podspec', :testspecs => ['Tests'] - pod 'Tutorial5', path: 'Frameworks/Tutorial5Complete/Tutorial5.podspec', :testspecs => ['Tests'] -end - -target 'TutorialTests' do - pod 'WorkflowTesting', path: '../../WorkflowTesting.podspec', :testspecs => ['Tests'] -end diff --git a/Samples/Tutorial/Project.swift b/Samples/Tutorial/Project.swift new file mode 100644 index 000000000..b9e430d32 --- /dev/null +++ b/Samples/Tutorial/Project.swift @@ -0,0 +1,121 @@ +import ProjectDescription +import ProjectDescriptionHelpers + +let project = Project( + name: "Tutorial", + settings: .settings(base: ["ENABLE_MODULE_VERIFIER": "YES"]), + targets: [ + .app( + name: "Tutorial", + sources: "AppHost/Sources/**", + dependencies: [ + .target(name: "TutorialBase"), + .target(name: "Tutorial1Complete"), + .target(name: "Tutorial2Complete"), + .target(name: "Tutorial3Complete"), + .target(name: "Tutorial4Complete"), + .target(name: "Tutorial5Complete"), + ] + ), + + .target( + name: "Tutorial1Complete", + sources: "Frameworks/Tutorial1Complete/Sources/**", + dependencies: [ + .target(name: "TutorialViews"), + .external(name: "WorkflowUI"), + .external(name: "WorkflowReactiveSwift"), + .project(target: "BackStackContainer", path: ".."), + ] + ), + + .target( + name: "Tutorial2Complete", + sources: "Frameworks/Tutorial2Complete/Sources/**", + dependencies: [ + .target(name: "TutorialViews"), + .external(name: "WorkflowUI"), + .external(name: "WorkflowReactiveSwift"), + .project(target: "BackStackContainer", path: ".."), + ] + ), + + .target( + name: "Tutorial3Complete", + sources: "Frameworks/Tutorial3Complete/Sources/**", + dependencies: [ + .target(name: "TutorialViews"), + .external(name: "WorkflowUI"), + .external(name: "WorkflowReactiveSwift"), + .project(target: "BackStackContainer", path: ".."), + ] + ), + + .target( + name: "Tutorial4Complete", + sources: "Frameworks/Tutorial4Complete/Sources/**", + dependencies: [ + .target(name: "TutorialViews"), + .external(name: "WorkflowUI"), + .external(name: "WorkflowReactiveSwift"), + .project(target: "BackStackContainer", path: ".."), + ] + ), + .unitTest( + for: "Tutorial4Complete", + sources: "Frameworks/Tutorial4Complete/Tests/**", + dependencies: [.target(name: "Tutorial4Complete")] + ), + + .target( + name: "Tutorial5Complete", + sources: "Frameworks/Tutorial5Complete/Sources/**", + dependencies: [ + .target(name: "TutorialViews"), + .external(name: "WorkflowUI"), + .external(name: "WorkflowReactiveSwift"), + .project(target: "BackStackContainer", path: ".."), + ] + ), + .unitTest( + for: "Tutorial5Complete", + sources: "Frameworks/Tutorial5Complete/Tests/**", + dependencies: [ + .target(name: "Tutorial5Complete"), + .external(name: "WorkflowTesting"), + ] + ), + + .target( + name: "TutorialBase", + sources: "Frameworks/TutorialBase/Sources/**", + dependencies: [ + .target(name: "TutorialViews"), + .external(name: "WorkflowUI"), + .external(name: "WorkflowReactiveSwift"), + .project(target: "BackStackContainer", path: ".."), + ] + ), + .unitTest( + for: "TutorialBase", + sources: "Frameworks/TutorialBase/Tests/**" + ), + + .target( + name: "TutorialViews", + sources: "Frameworks/TutorialViews/Sources/**" + ), + ], + schemes: [ + .scheme( + name: "TutorialTests", + testAction: .targets( + [ + .testableTarget(target: .target("Tutorial4Complete-Tests")), + .testableTarget(target: .target("Tutorial5Complete-Tests")), + .testableTarget(target: .target("TutorialBase-Tests")), + ] + ) + ) + ] +) diff --git a/Samples/Tutorial/README.md b/Samples/Tutorial/README.md index b5c274e26..65f6deb3f 100644 --- a/Samples/Tutorial/README.md +++ b/Samples/Tutorial/README.md @@ -18,22 +18,36 @@ To help with the setup, we have created a few helpers: ## Getting started -The tutorial uses [CocoaPods](https://guides.cocoapods.org/using/index.html) for dependency management. To get set up, run the following: +The tutorial uses [Tuist](https://tuist.io/) for project configuration. Follow the main README instructions for getting set up with Tuist first, and then run: -```sh +``` $ cd Samples/Tutorial -$ bundle install +$ tuist install +Resolving and fetching plugins. +Plugins resolved and fetched successfully. +Resolving and fetching dependencies. ... -Bundle complete! -$ bundle exec pod install -Analyzing dependencies -Downloading dependencies -Generating Pods project -Integrating client project -Pod installation complete! +$ tuist generate +Loading and constructing the graph +It might take a while if the cache is empty +Using cache binaries for the following targets: +Generating workspace Tutorial.xcworkspace +Generating project Workflow +Generating project Tutorial +Generating project swift-case-paths +Generating project Development +Generating project xctest-dynamic-overlay +Generating project swift-identified-collections +Generating project ReactiveSwift +Generating project swift-collections +Generating project swift-perception +Generating project iOSSnapshotTestCase +Generating project RxSwift +Generating project swift-syntax +Project generated. ``` -Then open `Tutorial.xcworkspace` in Xcode. +The `Tutorial.xcworkspace` workspace will open in Xcode automatically. # Tutorial Steps diff --git a/Samples/Tutorial/Tutorial.xcodeproj/project.pbxproj b/Samples/Tutorial/Tutorial.xcodeproj/project.pbxproj deleted file mode 100644 index 7a7f2f19d..000000000 --- a/Samples/Tutorial/Tutorial.xcodeproj/project.pbxproj +++ /dev/null @@ -1,575 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 54; - objects = { - -/* Begin PBXBuildFile section */ - 57AD55D94D909BD627910D7B /* libPods-TutorialTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5EF26974165B129BC6DE52E1 /* libPods-TutorialTests.a */; }; - E85390AB2314AF2D001B6313 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E85390AA2314AF2D001B6313 /* AppDelegate.swift */; }; - E85390B22314AF2E001B6313 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E85390B12314AF2E001B6313 /* Assets.xcassets */; }; - E85390B52314AF2E001B6313 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E85390B32314AF2E001B6313 /* LaunchScreen.storyboard */; }; - E8907A49231F162B00F1BB2E /* TutorialTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E8907A48231F162B00F1BB2E /* TutorialTests.swift */; }; - F77B18B3E43BEC102E47DEE6 /* libPods-Tutorial.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A115B9BFAF3DE7B7D706ACB7 /* libPods-Tutorial.a */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - E8907A4B231F162B00F1BB2E /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = E853909F2314AF2D001B6313 /* Project object */; - proxyType = 1; - remoteGlobalIDString = E85390A62314AF2D001B6313; - remoteInfo = Tutorial; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 5EF26974165B129BC6DE52E1 /* libPods-TutorialTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-TutorialTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 89B9987CFE631DF2BA454704 /* Pods-Tutorial.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Tutorial.release.xcconfig"; path = "Target Support Files/Pods-Tutorial/Pods-Tutorial.release.xcconfig"; sourceTree = ""; }; - A115B9BFAF3DE7B7D706ACB7 /* libPods-Tutorial.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Tutorial.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - BAD7C45E831F2461DD722CB8 /* Pods-Tutorial.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Tutorial.debug.xcconfig"; path = "Target Support Files/Pods-Tutorial/Pods-Tutorial.debug.xcconfig"; sourceTree = ""; }; - CB24A23238CDD92FC7B1717B /* Pods-TutorialTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TutorialTests.release.xcconfig"; path = "Target Support Files/Pods-TutorialTests/Pods-TutorialTests.release.xcconfig"; sourceTree = ""; }; - DB10D9654B0E3B8B61678123 /* Pods-TutorialTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TutorialTests.debug.xcconfig"; path = "Target Support Files/Pods-TutorialTests/Pods-TutorialTests.debug.xcconfig"; sourceTree = ""; }; - E85390A72314AF2D001B6313 /* Tutorial.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Tutorial.app; sourceTree = BUILT_PRODUCTS_DIR; }; - E85390AA2314AF2D001B6313 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - E85390B12314AF2E001B6313 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - E85390B42314AF2E001B6313 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - E85390B62314AF2E001B6313 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - E8907A46231F162B00F1BB2E /* TutorialTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TutorialTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - E8907A48231F162B00F1BB2E /* TutorialTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TutorialTests.swift; sourceTree = ""; }; - E8907A4A231F162B00F1BB2E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - E85390A42314AF2D001B6313 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - F77B18B3E43BEC102E47DEE6 /* libPods-Tutorial.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - E8907A43231F162B00F1BB2E /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 57AD55D94D909BD627910D7B /* libPods-TutorialTests.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 388F8A674EF339ECE9A5D046 /* Frameworks */ = { - isa = PBXGroup; - children = ( - A115B9BFAF3DE7B7D706ACB7 /* libPods-Tutorial.a */, - 5EF26974165B129BC6DE52E1 /* libPods-TutorialTests.a */, - ); - name = Frameworks; - sourceTree = ""; - }; - 96383393E09F25B5773BDA71 /* Pods */ = { - isa = PBXGroup; - children = ( - BAD7C45E831F2461DD722CB8 /* Pods-Tutorial.debug.xcconfig */, - 89B9987CFE631DF2BA454704 /* Pods-Tutorial.release.xcconfig */, - DB10D9654B0E3B8B61678123 /* Pods-TutorialTests.debug.xcconfig */, - CB24A23238CDD92FC7B1717B /* Pods-TutorialTests.release.xcconfig */, - ); - path = Pods; - sourceTree = ""; - }; - E853909E2314AF2D001B6313 = { - isa = PBXGroup; - children = ( - E85390BE2314B001001B6313 /* Configuration */, - E85390BD2314AFE7001B6313 /* Resources */, - E85390BC2314AFC8001B6313 /* Sources */, - E8907A47231F162B00F1BB2E /* TutorialTests */, - E85390A82314AF2D001B6313 /* Products */, - 96383393E09F25B5773BDA71 /* Pods */, - 388F8A674EF339ECE9A5D046 /* Frameworks */, - ); - sourceTree = ""; - }; - E85390A82314AF2D001B6313 /* Products */ = { - isa = PBXGroup; - children = ( - E85390A72314AF2D001B6313 /* Tutorial.app */, - E8907A46231F162B00F1BB2E /* TutorialTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - E85390BC2314AFC8001B6313 /* Sources */ = { - isa = PBXGroup; - children = ( - E85390AA2314AF2D001B6313 /* AppDelegate.swift */, - ); - name = Sources; - path = AppHost/Sources; - sourceTree = ""; - }; - E85390BD2314AFE7001B6313 /* Resources */ = { - isa = PBXGroup; - children = ( - E85390B12314AF2E001B6313 /* Assets.xcassets */, - E85390B32314AF2E001B6313 /* LaunchScreen.storyboard */, - ); - name = Resources; - path = AppHost/Resources; - sourceTree = ""; - }; - E85390BE2314B001001B6313 /* Configuration */ = { - isa = PBXGroup; - children = ( - E85390B62314AF2E001B6313 /* Info.plist */, - ); - name = Configuration; - path = AppHost/Configuration; - sourceTree = ""; - }; - E8907A47231F162B00F1BB2E /* TutorialTests */ = { - isa = PBXGroup; - children = ( - E8907A48231F162B00F1BB2E /* TutorialTests.swift */, - E8907A4A231F162B00F1BB2E /* Info.plist */, - ); - name = TutorialTests; - path = AppHost/TutorialTests; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - E85390A62314AF2D001B6313 /* Tutorial */ = { - isa = PBXNativeTarget; - buildConfigurationList = E85390B92314AF2E001B6313 /* Build configuration list for PBXNativeTarget "Tutorial" */; - buildPhases = ( - 7445F921FF925E3732A5F2CD /* [CP] Check Pods Manifest.lock */, - E85390A32314AF2D001B6313 /* Sources */, - E85390A42314AF2D001B6313 /* Frameworks */, - E85390A52314AF2D001B6313 /* Resources */, - E437DBFEAF9DDB6255B08476 /* [CP] Copy Pods Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Tutorial; - productName = Tutorial; - productReference = E85390A72314AF2D001B6313 /* Tutorial.app */; - productType = "com.apple.product-type.application"; - }; - E8907A45231F162B00F1BB2E /* TutorialTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = E8907A4F231F162B00F1BB2E /* Build configuration list for PBXNativeTarget "TutorialTests" */; - buildPhases = ( - F31716859C0BC0B7AA34707F /* [CP] Check Pods Manifest.lock */, - E8907A42231F162B00F1BB2E /* Sources */, - E8907A43231F162B00F1BB2E /* Frameworks */, - E8907A44231F162B00F1BB2E /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - E8907A4C231F162B00F1BB2E /* PBXTargetDependency */, - ); - name = TutorialTests; - productName = TutorialTests; - productReference = E8907A46231F162B00F1BB2E /* TutorialTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - E853909F2314AF2D001B6313 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 1020; - LastUpgradeCheck = 1020; - ORGANIZATIONNAME = Square; - TargetAttributes = { - E85390A62314AF2D001B6313 = { - CreatedOnToolsVersion = 10.2.1; - }; - E8907A45231F162B00F1BB2E = { - CreatedOnToolsVersion = 10.2.1; - TestTargetID = E85390A62314AF2D001B6313; - }; - }; - }; - buildConfigurationList = E85390A22314AF2D001B6313 /* Build configuration list for PBXProject "Tutorial" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = E853909E2314AF2D001B6313; - productRefGroup = E85390A82314AF2D001B6313 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - E85390A62314AF2D001B6313 /* Tutorial */, - E8907A45231F162B00F1BB2E /* TutorialTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - E85390A52314AF2D001B6313 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - E85390B52314AF2E001B6313 /* LaunchScreen.storyboard in Resources */, - E85390B22314AF2E001B6313 /* Assets.xcassets in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - E8907A44231F162B00F1BB2E /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 7445F921FF925E3732A5F2CD /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Tutorial-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - E437DBFEAF9DDB6255B08476 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Tutorial/Pods-Tutorial-resources-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Tutorial/Pods-Tutorial-resources-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Tutorial/Pods-Tutorial-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - F31716859C0BC0B7AA34707F /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-TutorialTests-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - E85390A32314AF2D001B6313 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - E85390AB2314AF2D001B6313 /* AppDelegate.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - E8907A42231F162B00F1BB2E /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - E8907A49231F162B00F1BB2E /* TutorialTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - E8907A4C231F162B00F1BB2E /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = E85390A62314AF2D001B6313 /* Tutorial */; - targetProxy = E8907A4B231F162B00F1BB2E /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin PBXVariantGroup section */ - E85390B32314AF2E001B6313 /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - E85390B42314AF2E001B6313 /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - E85390B72314AF2E001B6313 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.2; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - }; - name = Debug; - }; - E85390B82314AF2E001B6313 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.2; - MTL_ENABLE_DEBUG_INFO = NO; - MTL_FAST_MATH = YES; - SDKROOT = iphoneos; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - E85390BA2314AF2E001B6313 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = BAD7C45E831F2461DD722CB8 /* Pods-Tutorial.debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_STYLE = Automatic; - INFOPLIST_FILE = "$(SRCROOT)/AppHost/Configuration/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.squareup.Tutorial; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - E85390BB2314AF2E001B6313 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 89B9987CFE631DF2BA454704 /* Pods-Tutorial.release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_STYLE = Automatic; - INFOPLIST_FILE = "$(SRCROOT)/AppHost/Configuration/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.squareup.Tutorial; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; - E8907A4D231F162B00F1BB2E /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = DB10D9654B0E3B8B61678123 /* Pods-TutorialTests.debug.xcconfig */; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - CODE_SIGN_STYLE = Automatic; - INFOPLIST_FILE = AppHost/TutorialTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.squareup.TutorialTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Tutorial.app/Tutorial"; - }; - name = Debug; - }; - E8907A4E231F162B00F1BB2E /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = CB24A23238CDD92FC7B1717B /* Pods-TutorialTests.release.xcconfig */; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - CODE_SIGN_STYLE = Automatic; - INFOPLIST_FILE = AppHost/TutorialTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.squareup.TutorialTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Tutorial.app/Tutorial"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - E85390A22314AF2D001B6313 /* Build configuration list for PBXProject "Tutorial" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - E85390B72314AF2E001B6313 /* Debug */, - E85390B82314AF2E001B6313 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - E85390B92314AF2E001B6313 /* Build configuration list for PBXNativeTarget "Tutorial" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - E85390BA2314AF2E001B6313 /* Debug */, - E85390BB2314AF2E001B6313 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - E8907A4F231F162B00F1BB2E /* Build configuration list for PBXNativeTarget "TutorialTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - E8907A4D231F162B00F1BB2E /* Debug */, - E8907A4E231F162B00F1BB2E /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = E853909F2314AF2D001B6313 /* Project object */; -} diff --git a/Samples/Tutorial/Tutorial.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Samples/Tutorial/Tutorial.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index b1806ffae..000000000 --- a/Samples/Tutorial/Tutorial.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Samples/Tutorial/Tutorial.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Samples/Tutorial/Tutorial.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/Samples/Tutorial/Tutorial.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/Samples/Tutorial/Tutorial.xcodeproj/xcshareddata/xcschemes/Tutorial.xcscheme b/Samples/Tutorial/Tutorial.xcodeproj/xcshareddata/xcschemes/Tutorial.xcscheme deleted file mode 100644 index 686916191..000000000 --- a/Samples/Tutorial/Tutorial.xcodeproj/xcshareddata/xcschemes/Tutorial.xcscheme +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Samples/Tutorial/Tutorial.xcworkspace/contents.xcworkspacedata b/Samples/Tutorial/Tutorial.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index c96d59c6f..000000000 --- a/Samples/Tutorial/Tutorial.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/Samples/Tutorial/Tutorial.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Samples/Tutorial/Tutorial.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/Samples/Tutorial/Tutorial.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/Samples/Tutorial/Tutorial1.md b/Samples/Tutorial/Tutorial1.md index 0b27ec462..0f452dd4b 100644 --- a/Samples/Tutorial/Tutorial1.md +++ b/Samples/Tutorial/Tutorial1.md @@ -5,10 +5,10 @@ _Let's get something on the screen..._ ## Setup To follow this tutorial: -- Open your terminal and run `bundle exec pod install` in the `Samples/Tutorial` directory. -- Open `Tutorial.xcworkspace` and build the `Tutorial` Scheme. +- Open your terminal and run `tuist generate` in the `Samples/Tutorial` directory. +- After the project opens, build the `Tutorial-Workspace` Scheme. -The `TutorialBase` pod in `Pods/Development Pods` will be our starting place to build from. +The `TutorialBase` module in `Samples/Tutorial/Project/Frameworks/TutorialBase` will be our starting place to build from. The welcome screen should look like: diff --git a/Samples/Tutorial/Tutorial2.md b/Samples/Tutorial/Tutorial2.md index 4a997519c..27c3ad14b 100644 --- a/Samples/Tutorial/Tutorial2.md +++ b/Samples/Tutorial/Tutorial2.md @@ -5,8 +5,8 @@ _Multiple Screens and Navigation_ ## Setup To follow this tutorial: -- Open your terminal and run `bundle exec pod install` in the `Samples/Tutorial` directory. -- Open `Tutorial.xcworkspace` and build the `Tutorial` Scheme. +- Open your terminal and run `tuist generate` in the `Samples/Tutorial` directory. +- After the project opens, build the `Tutorial-Workspace` Scheme. Start from the implementation of `Tutorial1` if you're skipping ahead. You can do this by updating the `AppDelegate` to import `Tutorial1` instead of `TutorialBase`. diff --git a/Samples/Tutorial/Tutorial3.md b/Samples/Tutorial/Tutorial3.md index 6e09f35c9..f24c33389 100644 --- a/Samples/Tutorial/Tutorial3.md +++ b/Samples/Tutorial/Tutorial3.md @@ -5,8 +5,8 @@ _State throughout a tree of workflows_ ## Setup To follow this tutorial: -- Open your terminal and run `bundle exec pod install` in the `Samples/Tutorial` directory. -- Open `Tutorial.xcworkspace` and build the `Tutorial` Scheme. +- Open your terminal and run `tuist generate` in the `Samples/Tutorial` directory. +- After the project opens, build the `Tutorial-Workspace` Scheme. Start from the implementation of `Tutorial2` if you're skipping ahead. You can do this by updating the `AppDelegate` to import `Tutorial2` instead of `TutorialBase`. diff --git a/Samples/Tutorial/Tutorial4.md b/Samples/Tutorial/Tutorial4.md index 96200a51d..d82f34b03 100644 --- a/Samples/Tutorial/Tutorial4.md +++ b/Samples/Tutorial/Tutorial4.md @@ -5,8 +5,8 @@ _Refactoring and rebalancing a tree of Workflows_ ## Setup To follow this tutorial: -- Open your terminal and run `bundle exec pod install` in the `Samples/Tutorial` directory. -- Open `Tutorial.xcworkspace` and build the `Tutorial` Scheme. +- Open your terminal and run `tuist generate` in the `Samples/Tutorial` directory. +- After the project opens, build the `Tutorial-Workspace` Scheme. Start from the implementation of `Tutorial3` if you're skipping ahead. You can do this by updating the `AppDelegate` to import `Tutorial3` instead of `TutorialBase`. diff --git a/Samples/Tutorial/Tutorial5.md b/Samples/Tutorial/Tutorial5.md index 211dedd2e..61cd90047 100644 --- a/Samples/Tutorial/Tutorial5.md +++ b/Samples/Tutorial/Tutorial5.md @@ -5,8 +5,8 @@ _Unit and Integration Testing Workflows_ ## Setup To follow this tutorial: -- Open your terminal and run `bundle exec pod install` in the `Samples/Tutorial` directory. -- Open `Tutorial.xcworkspace` and build the `Tutorial` Scheme. +- Open your terminal and run `tuist generate` in the `Samples/Tutorial` directory. +- After the project opens, build the `Tutorial-Workspace` Scheme. - The unit tests will run from the default scheme when pressing `cmd+shift+u`. Start from the implementation of `Tutorial4` if you're skipping ahead. You can do this by updating the `AppDelegate` to import `Tutorial4` instead of `TutorialBase`. diff --git a/Samples/Workspace.swift b/Samples/Workspace.swift new file mode 100644 index 000000000..9d2bde9d3 --- /dev/null +++ b/Samples/Workspace.swift @@ -0,0 +1,6 @@ +import ProjectDescription + +let workspace = Workspace( + name: "Development", + projects: [".", "Tutorial"] +) From 951316dd425e1728be4d226b19eaa80f8d4887ce Mon Sep 17 00:00:00 2001 From: Andrew Watt Date: Fri, 6 Sep 2024 16:37:56 -0700 Subject: [PATCH 09/11] update ci config for tuist project --- .buildscript/build_swift_docs.sh | 9 +- .github/workflows/release.yml | 144 ------------------------------- .github/workflows/swift.yaml | 97 ++++----------------- Samples/Workspace.swift | 32 ++++++- 4 files changed, 50 insertions(+), 232 deletions(-) delete mode 100644 .github/workflows/release.yml diff --git a/.buildscript/build_swift_docs.sh b/.buildscript/build_swift_docs.sh index c71994765..8421db3fd 100755 --- a/.buildscript/build_swift_docs.sh +++ b/.buildscript/build_swift_docs.sh @@ -23,7 +23,7 @@ # Usage: ./build_swift_docs.sh OUTPUT_DIR SOURCEDOCS_OUTPUT_DIR="$1" -WORKFLOW_SCHEMES="Workflow WorkflowUI WorkflowTesting" +WORKFLOW_SCHEMES="ViewEnvironment ViewEnvironmentUI Workflow WorkflowUI WorkflowSwiftUI WorkflowTesting" if [[ -z "$SOURCEDOCS_OUTPUT_DIR" ]]; then echo "No output dir specified. Usage: \`build_swift_docs.sh [OUTPUT_DIR]\`" @@ -32,9 +32,8 @@ fi set -ex -# Prepare the Xcode project. -bundle exec pod gen Development.podspec -cd gen/Development +tuist install --path Samples +tuist generate --path Samples --no-open # Generate the API docs. for scheme in $WORKFLOW_SCHEMES; do @@ -42,5 +41,5 @@ for scheme in $WORKFLOW_SCHEMES; do --output-folder "$SOURCEDOCS_OUTPUT_DIR/$scheme" \ -- \ -scheme $scheme \ - -workspace Development.xcworkspace + -workspace Samples/Development.xcworkspace done diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 057511dd9..000000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,144 +0,0 @@ -name: Release Workflow - -on: - repository_dispatch: - types: [release] - -env: - RELEASE_TYPE: ${{ github.event.client_payload.release_type }} - WORKFLOW_VERSION: ${{ github.event.client_payload.workflow_version }} - SWIFT_CHANGELOG: ${{ github.event.client_payload.swift_changelog }} - PUBLISH_SWIFT: ${{ github.event.client_payload.publish_swift }} - PREFIX_FOR_TEST: ${{ github.event.client_payload.test_prefix }} - -jobs: - bump-main: - runs-on: macos-latest - - steps: - - name: Calculate Release Branch - run: | - MAJOR=$(cut -d'.' -f1 <<<'${{ env.WORKFLOW_VERSION }}') - MINOR=$(cut -d'.' -f2 <<<'${{ env.WORKFLOW_VERSION }}') - echo "::set-env name=RELEASE_BRANCH::${{ env.PREFIX_FOR_TEST }}release-v$MAJOR.$MINOR.x" - - - name: Checkout - uses: actions/checkout@v2 - - - name: Checkout Main - uses: actions/checkout@v2 - with: - ref: ${{ env.PREFIX_FOR_TEST }}main - path: main - - - name: Setup Release Branch (major, minor) - if: env.RELEASE_TYPE == 'major' || env.RELEASE_TYPE == 'minor' - run: | - cp -R main release - cd release - git checkout -b ${{ env.RELEASE_BRANCH }} - - - name: Setup Release Branch (patch) - if: env.RELEASE_TYPE == 'patch' - uses: actions/checkout@v2 - with: - ref: ${{ env.RELEASE_BRANCH }} - path: release - - - name: Update Changelog - run: | - cd main - ../.buildscript/update_changelog.swift - cd ../release - ../.buildscript/update_changelog.swift - - - name: Update Main Version (major, minor) - if: env.RELEASE_TYPE == 'major' || env.RELEASE_TYPE == 'minor' - run: | - cd main - ls Workflow*.podspec | xargs sed -i '' -e "s/ s.version\( *=\).*/ s.version\1 '${{ env.WORKFLOW_VERSION }}'/" - - - name: Push changes to main - env: - GIT_USERNAME: ${{ github.actor }} - GIT_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - run: | - cd main - git add -A . && git commit -m "Releasing ${{ env.WORKFLOW_VERSION }}" && git push -f - - - name: Push Release Branch - run: | - cd release - ls Workflow*.podspec | xargs sed -i '' -e "s/ s.version\( *=\).*/ s.version\1 '${{ env.WORKFLOW_VERSION }}'/" - git add -A .; git commit -m "Releasing ${{ env.WORKFLOW_VERSION }}" - git tag ${{ env.PREFIX_FOR_TEST }}v${{ env.WORKFLOW_VERSION }} - git push origin ${{ env.RELEASE_BRANCH }} ${{ env.PREFIX_FOR_TEST }}v${{ env.WORKFLOW_VERSION }} - - - name: Push to Cocoapods - if: env.PUBLISH_SWIFT == 'true' - run: | - echo "TODO: Push to Cocoapods" - - # Publish Documentation - # Swift caches (keys must match those defined in swift.yml) - - name: Load gem cache - uses: actions/cache@v1 - with: - path: release/.bundle - key: gems-${{ hashFiles('Gemfile.lock') }} - - - name: Set up Swift environment - run: | - # Set global bundle path so it gets used by build_swift_docs.sh running in the nested repo as well. - cd release - bundle config --global path "$(pwd)/.bundle" - bundle check || bundle install - # Don't need to run pod gen, the website script does that itself. - brew install sourcedocs - sudo xcode-select -s /Applications/Xcode_11.4.app - - # Docs dependencies - - name: Set up Python - uses: actions/setup-python@v1 - with: - python-version: 3.6 - - - name: Install Python dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements.txt - - # This environment variable step should be run after all 3rd-party actions to ensure nothing - # else accidentally overrides any of our special variables. - - name: 'If in test-mode: enable dry run' - if: env.PREFIX_FOR_TEST != '' - run: | - # When PREFIX_FOR_TEST is not empty, we shouldn't actually deploy, just do a dry run to make - # sure all the dependencies are set up correctly. - echo "::set-env name=DRY_RUN::true" - - - name: Debug info - run: | - cd release - echo event_name=${{ github.event_name }} - echo GITHUB_REF=$GITHUB_REF - echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF - echo DRY_RUN=$DRY_RUN - git remote -v - - ## Main steps - - name: Build and deploy website - env: - WORKFLOW_GOOGLE_ANALYTICS_KEY: ${{ secrets.WORKFLOW_GOOGLE_ANALYTICS_KEY }} - GIT_USERNAME: ${{ github.actor }} - GIT_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - run: | - cd release - ./deploy_website.sh ${{ env.PREFIX_FOR_TEST }}v${{ env.WORKFLOW_VERSION }} - - - - name: Create Github Release - run: | - echo "TODO: Create Github Release" - - diff --git a/.github/workflows/swift.yaml b/.github/workflows/swift.yaml index 7ac8e5773..386656644 100644 --- a/.github/workflows/swift.yaml +++ b/.github/workflows/swift.yaml @@ -9,72 +9,32 @@ on: env: XCODE_VERSION: 15.1 IOS_DESTINATION: platform=iOS Simulator,OS=17.2,name=iPad (10th generation) + TUIST_TEST_DEVICE: iPad (10th generation) + TUIST_TEST_PLATFORM: iOS + TUIST_TEST_OS: 17.2 jobs: - development-apps: + development-tests: runs-on: macos-latest strategy: matrix: scheme: - - Development-Unit-WorkflowTesting - - Development-Unit-WorkflowTests - - Development-Unit-WorkflowUITests - - Development-Unit-SplitScreenTests - - Development-Unit-TicTacToeTests - - Development-Unit-WorkflowReactiveSwiftTests - - Development-Unit-WorkflowRxSwiftTests - - Development-Unit-WorkflowReactiveSwiftTestingTests - - Development-Unit-WorkflowRxSwiftTestingTests - - steps: - - uses: actions/checkout@v4 - - - name: Setup Ruby - uses: ruby/setup-ruby@v1 - with: - # Uses version specified in .ruby_version - bundler-cache: true # runs 'bundle install' and caches installed gems automatically - - - name: Pod Install - run: | - bundle exec pod gen Development.podspec - - - name: Switch Xcode - run: sudo xcode-select -s /Applications/Xcode_${XCODE_VERSION}.app - - - name: Build & Test - run: | - set -o pipefail - xcodebuild \ - -workspace gen/Development/Development.xcworkspace \ - -scheme ${{ matrix.scheme }} \ - -destination "$IOS_DESTINATION" \ - build test | bundle exec xcpretty - - xcodegen-apps: - runs-on: macos-latest + - UnitTests + - SnapshotTests steps: - uses: actions/checkout@v4 + - uses: jdx/mise-action@v2 - name: Switch Xcode run: sudo xcode-select -s /Applications/Xcode_${XCODE_VERSION}.app - - name: Install XcodeGen - run: brew install xcodegen - - - name: Generate Xcode project - run: xcodegen generate + - name: Install dependencies + run: tuist install --path Samples - - name: ObservableScreen - run: | - xcodebuild \ - -project Workflow.xcodeproj \ - -scheme "ObservableScreen" \ - -destination "$IOS_DESTINATION" \ - -skipMacroValidation \ - build + - name: Test iOS + run: tuist test --path Samples ${{ matrix.scheme }} package-tests: runs-on: macos-latest @@ -85,32 +45,10 @@ jobs: - name: Switch Xcode run: sudo xcode-select -s /Applications/Xcode_${XCODE_VERSION}.app - - name: Install XcodeGen - run: brew install xcodegen - - - name: Generate Xcode project - run: xcodegen generate - - # Macros are only built for the compiler platform, so we cannot run macro tests on iOS. Instead - # we target a scheme from project.yml which selectively includes all the other tests. - - name: Tests - iOS - run: | - xcodebuild \ - -project Workflow.xcodeproj \ - -scheme "Tests-iOS" \ - -destination "$IOS_DESTINATION" \ - -skipMacroValidation \ - test - + # Command line swift runs on the host platform. # On macOS we can run all tests, including macro tests. - - name: Tests - macOS - run: | - xcodebuild \ - -project Workflow.xcodeproj \ - -scheme "Tests-All" \ - -destination "platform=macOS" \ - -skipMacroValidation \ - test + - name: Test macOS + run: swift test tutorial: runs-on: macos-latest @@ -133,12 +71,7 @@ jobs: steps: - uses: actions/checkout@v4 - - - name: Setup Ruby - uses: ruby/setup-ruby@v1 - with: - # Uses version specified in .ruby_version - bundler-cache: true # runs 'bundle install' and caches installed gems automatically + - uses: jdx/mise-action@v2 - name: Switch Xcode run: sudo xcode-select -s /Applications/Xcode_${XCODE_VERSION}.app diff --git a/Samples/Workspace.swift b/Samples/Workspace.swift index 9d2bde9d3..6e24e2b05 100644 --- a/Samples/Workspace.swift +++ b/Samples/Workspace.swift @@ -1,6 +1,36 @@ import ProjectDescription +import ProjectDescriptionHelpers let workspace = Workspace( name: "Development", - projects: [".", "Tutorial"] + projects: [".", "Tutorial"], + schemes: [ + // Generate a scheme for each target in Package.swift for convenience + .workflow("Workflow"), + .workflow("WorkflowTesting"), + .workflow("WorkflowUI"), + .workflow("WorkflowSwiftUI"), + .workflow("WorkflowSwiftUIMacros"), + .workflow("WorkflowReactiveSwift"), + .workflow("WorkflowReactiveSwiftTesting"), + .workflow("WorkflowRxSwift"), + .workflow("WorkflowRxSwiftTesting"), + .workflow("WorkflowCombine"), + .workflow("WorkflowCombineTesting"), + .workflow("WorkflowConcurrency"), + .workflow("WorkflowConcurrencyTesting"), + .workflow("ViewEnvironment"), + .workflow("ViewEnvironmentUI"), + .workflow("WorkflowSwiftUIExperimental"), + ] ) + + +extension Scheme { + public static func workflow(_ target: String) -> Self { + .scheme( + name: target, + buildAction: .buildAction(targets: [.project(path: "..", target: target)]) + ) + } +} From a50ebffc741983b269d399ad46bdd5d457e62eb1 Mon Sep 17 00:00:00 2001 From: Andrew Watt Date: Mon, 9 Sep 2024 17:55:20 -0700 Subject: [PATCH 10/11] convert AsyncWorker --- .../AsyncWorker.xcodeproj/project.pbxproj | 407 ------------------ .../contents.xcworkspacedata | 7 - .../xcshareddata/IDEWorkspaceChecks.plist | 8 - .../AsyncWorker/AsyncWorker/AppDelegate.swift | 31 -- .../AccentColor.colorset/Contents.json | 11 - .../AppIcon.appiconset/Contents.json | 93 ---- .../AsyncWorker/Assets.xcassets/Contents.json | 6 - .../Base.lproj/LaunchScreen.storyboard | 25 -- Samples/AsyncWorker/AsyncWorker/Info.plist | 23 - .../AsyncWorker/SceneDelegate.swift | 53 --- Samples/AsyncWorker/README.md | 2 - Samples/AsyncWorker/Sources/AppDelegate.swift | 23 + .../AsyncWorkerWorkflow.swift | 0 .../FakeNetwork/FakeNetworkManager.swift | 0 .../FakeNetwork/Model.swift | 0 .../MessageViewController.swift | 0 Samples/Project.swift | 11 +- 17 files changed, 32 insertions(+), 668 deletions(-) delete mode 100644 Samples/AsyncWorker/AsyncWorker.xcodeproj/project.pbxproj delete mode 100644 Samples/AsyncWorker/AsyncWorker.xcodeproj/project.xcworkspace/contents.xcworkspacedata delete mode 100644 Samples/AsyncWorker/AsyncWorker.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 Samples/AsyncWorker/AsyncWorker/AppDelegate.swift delete mode 100644 Samples/AsyncWorker/AsyncWorker/Assets.xcassets/AccentColor.colorset/Contents.json delete mode 100644 Samples/AsyncWorker/AsyncWorker/Assets.xcassets/AppIcon.appiconset/Contents.json delete mode 100644 Samples/AsyncWorker/AsyncWorker/Assets.xcassets/Contents.json delete mode 100644 Samples/AsyncWorker/AsyncWorker/Base.lproj/LaunchScreen.storyboard delete mode 100644 Samples/AsyncWorker/AsyncWorker/Info.plist delete mode 100644 Samples/AsyncWorker/AsyncWorker/SceneDelegate.swift create mode 100644 Samples/AsyncWorker/Sources/AppDelegate.swift rename Samples/AsyncWorker/{AsyncWorker => Sources}/AsyncWorkerWorkflow.swift (100%) rename Samples/AsyncWorker/{AsyncWorker => Sources}/FakeNetwork/FakeNetworkManager.swift (100%) rename Samples/AsyncWorker/{AsyncWorker => Sources}/FakeNetwork/Model.swift (100%) rename Samples/AsyncWorker/{AsyncWorker => Sources}/MessageViewController.swift (100%) diff --git a/Samples/AsyncWorker/AsyncWorker.xcodeproj/project.pbxproj b/Samples/AsyncWorker/AsyncWorker.xcodeproj/project.pbxproj deleted file mode 100644 index 84ab6f44a..000000000 --- a/Samples/AsyncWorker/AsyncWorker.xcodeproj/project.pbxproj +++ /dev/null @@ -1,407 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 55; - objects = { - -/* Begin PBXBuildFile section */ - DDC4A2BA28623A8C00C36259 /* Workflow in Frameworks */ = {isa = PBXBuildFile; productRef = DDC4A2B928623A8C00C36259 /* Workflow */; }; - DDC4A2BC28624ABD00C36259 /* MessageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDC4A2BB28624ABD00C36259 /* MessageViewController.swift */; }; - DDC4A2BE28624AD500C36259 /* WorkflowUI in Frameworks */ = {isa = PBXBuildFile; productRef = DDC4A2BD28624AD500C36259 /* WorkflowUI */; }; - DDC5F381285B768400C1C278 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDC5F380285B768400C1C278 /* AppDelegate.swift */; }; - DDC5F383285B768400C1C278 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDC5F382285B768400C1C278 /* SceneDelegate.swift */; }; - DDC5F38A285B768500C1C278 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DDC5F389285B768500C1C278 /* Assets.xcassets */; }; - DDC5F38D285B768500C1C278 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DDC5F38B285B768500C1C278 /* LaunchScreen.storyboard */; }; - DDC5F39A285B76CF00C1C278 /* WorkflowConcurrency in Frameworks */ = {isa = PBXBuildFile; productRef = DDC5F399285B76CF00C1C278 /* WorkflowConcurrency */; }; - DDC5F39E285B777100C1C278 /* AsyncWorkerWorkflow.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDC5F39D285B777100C1C278 /* AsyncWorkerWorkflow.swift */; }; - DDC5F3A1285B781700C1C278 /* FakeNetworkManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDC5F3A0285B781700C1C278 /* FakeNetworkManager.swift */; }; - DDC5F3A3285B785C00C1C278 /* Model.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDC5F3A2285B785C00C1C278 /* Model.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - DDC4A2B828623A7A00C36259 /* workflow-swift */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = "workflow-swift"; path = ../..; sourceTree = ""; }; - DDC4A2BB28624ABD00C36259 /* MessageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageViewController.swift; sourceTree = ""; }; - DDC5F37D285B768400C1C278 /* AsyncWorker.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AsyncWorker.app; sourceTree = BUILT_PRODUCTS_DIR; }; - DDC5F380285B768400C1C278 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - DDC5F382285B768400C1C278 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; - DDC5F389285B768500C1C278 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - DDC5F38C285B768500C1C278 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - DDC5F38E285B768500C1C278 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - DDC5F39D285B777100C1C278 /* AsyncWorkerWorkflow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AsyncWorkerWorkflow.swift; sourceTree = ""; }; - DDC5F3A0285B781700C1C278 /* FakeNetworkManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeNetworkManager.swift; sourceTree = ""; }; - DDC5F3A2285B785C00C1C278 /* Model.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Model.swift; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - DDC5F37A285B768400C1C278 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - DDC4A2BE28624AD500C36259 /* WorkflowUI in Frameworks */, - DDC5F39A285B76CF00C1C278 /* WorkflowConcurrency in Frameworks */, - DDC4A2BA28623A8C00C36259 /* Workflow in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - DDC5F374285B768400C1C278 = { - isa = PBXGroup; - children = ( - DDC4A2B828623A7A00C36259 /* workflow-swift */, - DDC5F37F285B768400C1C278 /* AsyncWorker */, - DDC5F37E285B768400C1C278 /* Products */, - DDC5F398285B76CF00C1C278 /* Frameworks */, - ); - sourceTree = ""; - }; - DDC5F37E285B768400C1C278 /* Products */ = { - isa = PBXGroup; - children = ( - DDC5F37D285B768400C1C278 /* AsyncWorker.app */, - ); - name = Products; - sourceTree = ""; - }; - DDC5F37F285B768400C1C278 /* AsyncWorker */ = { - isa = PBXGroup; - children = ( - DDC5F39F285B77DF00C1C278 /* FakeNetwork */, - DDC5F380285B768400C1C278 /* AppDelegate.swift */, - DDC5F382285B768400C1C278 /* SceneDelegate.swift */, - DDC5F39D285B777100C1C278 /* AsyncWorkerWorkflow.swift */, - DDC5F389285B768500C1C278 /* Assets.xcassets */, - DDC5F38B285B768500C1C278 /* LaunchScreen.storyboard */, - DDC5F38E285B768500C1C278 /* Info.plist */, - DDC4A2BB28624ABD00C36259 /* MessageViewController.swift */, - ); - path = AsyncWorker; - sourceTree = ""; - }; - DDC5F398285B76CF00C1C278 /* Frameworks */ = { - isa = PBXGroup; - children = ( - ); - name = Frameworks; - sourceTree = ""; - }; - DDC5F39F285B77DF00C1C278 /* FakeNetwork */ = { - isa = PBXGroup; - children = ( - DDC5F3A0285B781700C1C278 /* FakeNetworkManager.swift */, - DDC5F3A2285B785C00C1C278 /* Model.swift */, - ); - path = FakeNetwork; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - DDC5F37C285B768400C1C278 /* AsyncWorker */ = { - isa = PBXNativeTarget; - buildConfigurationList = DDC5F391285B768500C1C278 /* Build configuration list for PBXNativeTarget "AsyncWorker" */; - buildPhases = ( - DDC5F379285B768400C1C278 /* Sources */, - DDC5F37A285B768400C1C278 /* Frameworks */, - DDC5F37B285B768400C1C278 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = AsyncWorker; - packageProductDependencies = ( - DDC5F399285B76CF00C1C278 /* WorkflowConcurrency */, - DDC4A2B928623A8C00C36259 /* Workflow */, - DDC4A2BD28624AD500C36259 /* WorkflowUI */, - ); - productName = AsyncWorker; - productReference = DDC5F37D285B768400C1C278 /* AsyncWorker.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - DDC5F375285B768400C1C278 /* Project object */ = { - isa = PBXProject; - attributes = { - BuildIndependentTargetsInParallel = 1; - LastSwiftUpdateCheck = 1330; - LastUpgradeCheck = 1330; - TargetAttributes = { - DDC5F37C285B768400C1C278 = { - CreatedOnToolsVersion = 13.3.1; - }; - }; - }; - buildConfigurationList = DDC5F378285B768400C1C278 /* Build configuration list for PBXProject "AsyncWorker" */; - compatibilityVersion = "Xcode 13.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = DDC5F374285B768400C1C278; - packageReferences = ( - ); - productRefGroup = DDC5F37E285B768400C1C278 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - DDC5F37C285B768400C1C278 /* AsyncWorker */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - DDC5F37B285B768400C1C278 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - DDC5F38D285B768500C1C278 /* LaunchScreen.storyboard in Resources */, - DDC5F38A285B768500C1C278 /* Assets.xcassets in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - DDC5F379285B768400C1C278 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - DDC5F3A1285B781700C1C278 /* FakeNetworkManager.swift in Sources */, - DDC5F381285B768400C1C278 /* AppDelegate.swift in Sources */, - DDC5F383285B768400C1C278 /* SceneDelegate.swift in Sources */, - DDC5F3A3285B785C00C1C278 /* Model.swift in Sources */, - DDC5F39E285B777100C1C278 /* AsyncWorkerWorkflow.swift in Sources */, - DDC4A2BC28624ABD00C36259 /* MessageViewController.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - DDC5F38B285B768500C1C278 /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - DDC5F38C285B768500C1C278 /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - DDC5F38F285B768500C1C278 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 15.4; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - }; - name = Debug; - }; - DDC5F390285B768500C1C278 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 15.4; - MTL_ENABLE_DEBUG_INFO = NO; - MTL_FAST_MATH = YES; - SDKROOT = iphoneos; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - DDC5F392285B768500C1C278 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = AsyncWorker/Info.plist; - INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; - INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.squareup.AsyncWorker; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - DDC5F393285B768500C1C278 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = AsyncWorker/Info.plist; - INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; - INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.squareup.AsyncWorker; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - DDC5F378285B768400C1C278 /* Build configuration list for PBXProject "AsyncWorker" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - DDC5F38F285B768500C1C278 /* Debug */, - DDC5F390285B768500C1C278 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - DDC5F391285B768500C1C278 /* Build configuration list for PBXNativeTarget "AsyncWorker" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - DDC5F392285B768500C1C278 /* Debug */, - DDC5F393285B768500C1C278 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - -/* Begin XCSwiftPackageProductDependency section */ - DDC4A2B928623A8C00C36259 /* Workflow */ = { - isa = XCSwiftPackageProductDependency; - productName = Workflow; - }; - DDC4A2BD28624AD500C36259 /* WorkflowUI */ = { - isa = XCSwiftPackageProductDependency; - productName = WorkflowUI; - }; - DDC5F399285B76CF00C1C278 /* WorkflowConcurrency */ = { - isa = XCSwiftPackageProductDependency; - productName = WorkflowConcurrency; - }; -/* End XCSwiftPackageProductDependency section */ - }; - rootObject = DDC5F375285B768400C1C278 /* Project object */; -} diff --git a/Samples/AsyncWorker/AsyncWorker.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Samples/AsyncWorker/AsyncWorker.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a62..000000000 --- a/Samples/AsyncWorker/AsyncWorker.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Samples/AsyncWorker/AsyncWorker.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Samples/AsyncWorker/AsyncWorker.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/Samples/AsyncWorker/AsyncWorker.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/Samples/AsyncWorker/AsyncWorker/AppDelegate.swift b/Samples/AsyncWorker/AsyncWorker/AppDelegate.swift deleted file mode 100644 index ace5ca08e..000000000 --- a/Samples/AsyncWorker/AsyncWorker/AppDelegate.swift +++ /dev/null @@ -1,31 +0,0 @@ -// -// AppDelegate.swift -// AsyncWorker -// -// Created by Mark Johnson on 6/16/22. -// - -import UIKit -import Workflow - -@main -class AppDelegate: UIResponder, UIApplicationDelegate { - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { - // Override point for customization after application launch. - return true - } - - // MARK: UISceneSession Lifecycle - - func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { - // Called when a new scene session is being created. - // Use this method to select a configuration to create the new scene with. - return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) - } - - func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { - // Called when the user discards a scene session. - // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. - // Use this method to release any resources that were specific to the discarded scenes, as they will not return. - } -} diff --git a/Samples/AsyncWorker/AsyncWorker/Assets.xcassets/AccentColor.colorset/Contents.json b/Samples/AsyncWorker/AsyncWorker/Assets.xcassets/AccentColor.colorset/Contents.json deleted file mode 100644 index eb8789700..000000000 --- a/Samples/AsyncWorker/AsyncWorker/Assets.xcassets/AccentColor.colorset/Contents.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "colors" : [ - { - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Samples/AsyncWorker/AsyncWorker/Assets.xcassets/AppIcon.appiconset/Contents.json b/Samples/AsyncWorker/AsyncWorker/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 5a3257a7d..000000000 --- a/Samples/AsyncWorker/AsyncWorker/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,93 +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" : "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/AsyncWorker/AsyncWorker/Assets.xcassets/Contents.json b/Samples/AsyncWorker/AsyncWorker/Assets.xcassets/Contents.json deleted file mode 100644 index 73c00596a..000000000 --- a/Samples/AsyncWorker/AsyncWorker/Assets.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Samples/AsyncWorker/AsyncWorker/Base.lproj/LaunchScreen.storyboard b/Samples/AsyncWorker/AsyncWorker/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index 865e9329f..000000000 --- a/Samples/AsyncWorker/AsyncWorker/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Samples/AsyncWorker/AsyncWorker/Info.plist b/Samples/AsyncWorker/AsyncWorker/Info.plist deleted file mode 100644 index 0eb786dc1..000000000 --- a/Samples/AsyncWorker/AsyncWorker/Info.plist +++ /dev/null @@ -1,23 +0,0 @@ - - - - - UIApplicationSceneManifest - - UIApplicationSupportsMultipleScenes - - UISceneConfigurations - - UIWindowSceneSessionRoleApplication - - - UISceneConfigurationName - Default Configuration - UISceneDelegateClassName - $(PRODUCT_MODULE_NAME).SceneDelegate - - - - - - diff --git a/Samples/AsyncWorker/AsyncWorker/SceneDelegate.swift b/Samples/AsyncWorker/AsyncWorker/SceneDelegate.swift deleted file mode 100644 index 892c615c8..000000000 --- a/Samples/AsyncWorker/AsyncWorker/SceneDelegate.swift +++ /dev/null @@ -1,53 +0,0 @@ -// -// SceneDelegate.swift -// AsyncWorker -// -// Created by Mark Johnson on 6/16/22. -// - -import UIKit -import WorkflowUI - -class SceneDelegate: UIResponder, UIWindowSceneDelegate { - var window: UIWindow? - - func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { - // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. - // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. - // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). - guard let windowScene = (scene as? UIWindowScene) else { return } - - let window = UIWindow(windowScene: windowScene) - window.rootViewController = WorkflowHostingController(workflow: AsyncWorkerWorkflow()) - self.window = window - window.makeKeyAndVisible() - } - - func sceneDidDisconnect(_ scene: UIScene) { - // Called as the scene is being released by the system. - // This occurs shortly after the scene enters the background, or when its session is discarded. - // Release any resources associated with this scene that can be re-created the next time the scene connects. - // The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead). - } - - func sceneDidBecomeActive(_ scene: UIScene) { - // Called when the scene has moved from an inactive state to an active state. - // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. - } - - func sceneWillResignActive(_ scene: UIScene) { - // Called when the scene will move from an active state to an inactive state. - // This may occur due to temporary interruptions (ex. an incoming phone call). - } - - func sceneWillEnterForeground(_ scene: UIScene) { - // Called as the scene transitions from the background to the foreground. - // Use this method to undo the changes made on entering the background. - } - - func sceneDidEnterBackground(_ scene: UIScene) { - // Called as the scene transitions from the foreground to the background. - // Use this method to save data, release shared resources, and store enough scene-specific state information - // to restore the scene back to its current state. - } -} diff --git a/Samples/AsyncWorker/README.md b/Samples/AsyncWorker/README.md index 8b4e863e4..59a9f0009 100644 --- a/Samples/AsyncWorker/README.md +++ b/Samples/AsyncWorker/README.md @@ -5,5 +5,3 @@ Demonstrates how to create a `WorkflowConcurrency` async `Worker`. This is an example of how you would create a closure based network request from within the async function of a `WorkflowConcurrency` `Worker`. `AsyncWorkerWorkflow.swift` contains the `Worker` implementation. - -This sample uses a local swift package reference for Workflow so that the Development.podspec doesn't have to have it's iOS deployment target increased to iOS 13+. diff --git a/Samples/AsyncWorker/Sources/AppDelegate.swift b/Samples/AsyncWorker/Sources/AppDelegate.swift new file mode 100644 index 000000000..3cfadd531 --- /dev/null +++ b/Samples/AsyncWorker/Sources/AppDelegate.swift @@ -0,0 +1,23 @@ +// +// AppDelegate.swift +// AsyncWorker +// +// Created by Mark Johnson on 6/16/22. +// + +import UIKit +import WorkflowUI + +@main +class AppDelegate: UIResponder, UIApplicationDelegate { + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + let window = UIWindow(frame: UIScreen.main.bounds) + + window.rootViewController = WorkflowHostingController(workflow: AsyncWorkerWorkflow()) + self.window = window + window.makeKeyAndVisible() + return true + } +} diff --git a/Samples/AsyncWorker/AsyncWorker/AsyncWorkerWorkflow.swift b/Samples/AsyncWorker/Sources/AsyncWorkerWorkflow.swift similarity index 100% rename from Samples/AsyncWorker/AsyncWorker/AsyncWorkerWorkflow.swift rename to Samples/AsyncWorker/Sources/AsyncWorkerWorkflow.swift diff --git a/Samples/AsyncWorker/AsyncWorker/FakeNetwork/FakeNetworkManager.swift b/Samples/AsyncWorker/Sources/FakeNetwork/FakeNetworkManager.swift similarity index 100% rename from Samples/AsyncWorker/AsyncWorker/FakeNetwork/FakeNetworkManager.swift rename to Samples/AsyncWorker/Sources/FakeNetwork/FakeNetworkManager.swift diff --git a/Samples/AsyncWorker/AsyncWorker/FakeNetwork/Model.swift b/Samples/AsyncWorker/Sources/FakeNetwork/Model.swift similarity index 100% rename from Samples/AsyncWorker/AsyncWorker/FakeNetwork/Model.swift rename to Samples/AsyncWorker/Sources/FakeNetwork/Model.swift diff --git a/Samples/AsyncWorker/AsyncWorker/MessageViewController.swift b/Samples/AsyncWorker/Sources/MessageViewController.swift similarity index 100% rename from Samples/AsyncWorker/AsyncWorker/MessageViewController.swift rename to Samples/AsyncWorker/Sources/MessageViewController.swift diff --git a/Samples/Project.swift b/Samples/Project.swift index f6808a16b..69a8bc4fb 100644 --- a/Samples/Project.swift +++ b/Samples/Project.swift @@ -47,8 +47,15 @@ let project = Project( name: "AlertContainer", dependencies: [.external(name: "WorkflowUI")] ), - - // TODO: AsyncWorker has a dedicated xcodeproj + + .app( + name: "AsyncWorker", + sources: "AsyncWorker/Sources/**", + dependencies: [ + .external(name: "WorkflowConcurrency"), + .external(name: "WorkflowUI"), + ] + ), .target( name: "BackStackContainer", From ff5fd734206f990071417e8be878f7667490441c Mon Sep 17 00:00:00 2001 From: Andrew Watt Date: Wed, 18 Sep 2024 14:23:05 -0700 Subject: [PATCH 11/11] update documentation --- README.md | 20 ++++++++++++++++++++ WorkflowSwiftUIExperimental/README.md | 8 -------- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 0d4bda340..14bd41415 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,26 @@ pod 'WorkflowUI' * [Documentation](https://square.github.io/workflow/) +## Local Development + +This project uses [Mise](https://mise.jdx.dev/) and [Tuist](https://tuist.io/) to generate a project for local development. Follow the steps below for the recommended setup for zsh. + +```sh +# install mise +brew install mise +# add mise activation line to your zshrc +echo 'eval "$(mise activate zsh)"' >> ~/.zshrc +# load mise into your shell +source ~/.zshrc +# install dependencies +mise install + +# only necessary for first setup or after changing dependencies +tuist install --path Samples +# generates and opens the Xcode project +tuist generate --path Samples +``` + ## Releasing and Deploying See [RELEASING.md](RELEASING.md). diff --git a/WorkflowSwiftUIExperimental/README.md b/WorkflowSwiftUIExperimental/README.md index 65c01b8b4..30864c0db 100644 --- a/WorkflowSwiftUIExperimental/README.md +++ b/WorkflowSwiftUIExperimental/README.md @@ -1,11 +1,3 @@ # WorkflowSwiftUIExperimental Experimental extensions to Workflow for writing Screens in SwiftUI. - -## Versioning - -Because this module is experimental, it is versioned separately from other modules in Workflow. You should bump its version as part of any pull request that changes it, and need not bump its version in PRs that change only other modules. - -Per semantic versioning, its major version remains at `0`, and only its minor version is incremented. Any increase in the minor version may come with breaking changes. - -To bump the minor version, update `s.version` in `WorkflowSwiftUIExperimental.podspec`. \ No newline at end of file