diff --git a/Examples/xx-messenger/.swiftpm/xcode/xcshareddata/xcschemes/ResetAuthFeature.xcscheme b/Examples/xx-messenger/.swiftpm/xcode/xcshareddata/xcschemes/ResetAuthFeature.xcscheme new file mode 100644 index 0000000000000000000000000000000000000000..dded8f8def9e1bf44393cece148486be88e940d6 --- /dev/null +++ b/Examples/xx-messenger/.swiftpm/xcode/xcshareddata/xcschemes/ResetAuthFeature.xcscheme @@ -0,0 +1,78 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Scheme + LastUpgradeVersion = "1400" + version = "1.3"> + <BuildAction + parallelizeBuildables = "YES" + buildImplicitDependencies = "YES"> + <BuildActionEntries> + <BuildActionEntry + buildForTesting = "YES" + buildForRunning = "YES" + buildForProfiling = "YES" + buildForArchiving = "YES" + buildForAnalyzing = "YES"> + <BuildableReference + BuildableIdentifier = "primary" + BlueprintIdentifier = "ResetAuthFeature" + BuildableName = "ResetAuthFeature" + BlueprintName = "ResetAuthFeature" + ReferencedContainer = "container:"> + </BuildableReference> + </BuildActionEntry> + </BuildActionEntries> + </BuildAction> + <TestAction + buildConfiguration = "Debug" + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + shouldUseLaunchSchemeArgsEnv = "YES" + codeCoverageEnabled = "YES"> + <Testables> + <TestableReference + skipped = "NO"> + <BuildableReference + BuildableIdentifier = "primary" + BlueprintIdentifier = "ResetAuthFeatureTests" + BuildableName = "ResetAuthFeatureTests" + BlueprintName = "ResetAuthFeatureTests" + ReferencedContainer = "container:"> + </BuildableReference> + </TestableReference> + </Testables> + </TestAction> + <LaunchAction + buildConfiguration = "Debug" + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + launchStyle = "0" + useCustomWorkingDirectory = "NO" + ignoresPersistentStateOnLaunch = "NO" + debugDocumentVersioning = "YES" + debugServiceExtension = "internal" + allowLocationSimulation = "YES"> + </LaunchAction> + <ProfileAction + buildConfiguration = "Release" + shouldUseLaunchSchemeArgsEnv = "YES" + savedToolIdentifier = "" + useCustomWorkingDirectory = "NO" + debugDocumentVersioning = "YES"> + <MacroExpansion> + <BuildableReference + BuildableIdentifier = "primary" + BlueprintIdentifier = "ResetAuthFeature" + BuildableName = "ResetAuthFeature" + BlueprintName = "ResetAuthFeature" + ReferencedContainer = "container:"> + </BuildableReference> + </MacroExpansion> + </ProfileAction> + <AnalyzeAction + buildConfiguration = "Debug"> + </AnalyzeAction> + <ArchiveAction + buildConfiguration = "Release" + revealArchiveInOrganizer = "YES"> + </ArchiveAction> +</Scheme> diff --git a/Examples/xx-messenger/Package.swift b/Examples/xx-messenger/Package.swift index d863e016e9f28069ddcc36104793639aef96be33..118b4b14b24086fba31eae4a68330bab57700993 100644 --- a/Examples/xx-messenger/Package.swift +++ b/Examples/xx-messenger/Package.swift @@ -25,6 +25,7 @@ let package = Package( .library(name: "HomeFeature", targets: ["HomeFeature"]), .library(name: "MyContactFeature", targets: ["MyContactFeature"]), .library(name: "RegisterFeature", targets: ["RegisterFeature"]), + .library(name: "ResetAuthFeature", targets: ["ResetAuthFeature"]), .library(name: "RestoreFeature", targets: ["RestoreFeature"]), .library(name: "SendRequestFeature", targets: ["SendRequestFeature"]), .library(name: "UserSearchFeature", targets: ["UserSearchFeature"]), @@ -310,6 +311,21 @@ let package = Package( ], swiftSettings: swiftSettings ), + .target( + name: "ResetAuthFeature", + dependencies: [ + .product(name: "ComposableArchitecture", package: "swift-composable-architecture"), + .product(name: "XXClient", package: "elixxir-dapps-sdk-swift"), + ], + swiftSettings: swiftSettings + ), + .testTarget( + name: "ResetAuthFeatureTests", + dependencies: [ + .target(name: "ResetAuthFeature"), + ], + swiftSettings: swiftSettings + ), .target( name: "RestoreFeature", dependencies: [ diff --git a/Examples/xx-messenger/Project/XXMessenger.xcodeproj/xcshareddata/xcschemes/XXMessenger.xcscheme b/Examples/xx-messenger/Project/XXMessenger.xcodeproj/xcshareddata/xcschemes/XXMessenger.xcscheme index 42a3cede69290ef2541f14fb20a7c54ad71831b5..09928db4491f32d54ece8ef3dce65bb252abbab7 100644 --- a/Examples/xx-messenger/Project/XXMessenger.xcodeproj/xcshareddata/xcschemes/XXMessenger.xcscheme +++ b/Examples/xx-messenger/Project/XXMessenger.xcodeproj/xcshareddata/xcschemes/XXMessenger.xcscheme @@ -149,6 +149,16 @@ ReferencedContainer = "container:.."> </BuildableReference> </TestableReference> + <TestableReference + skipped = "NO"> + <BuildableReference + BuildableIdentifier = "primary" + BlueprintIdentifier = "ResetAuthFeatureTests" + BuildableName = "ResetAuthFeatureTests" + BlueprintName = "ResetAuthFeatureTests" + ReferencedContainer = "container:.."> + </BuildableReference> + </TestableReference> <TestableReference skipped = "NO"> <BuildableReference diff --git a/Examples/xx-messenger/Sources/ResetAuthFeature/ResetAuthFeature.swift b/Examples/xx-messenger/Sources/ResetAuthFeature/ResetAuthFeature.swift new file mode 100644 index 0000000000000000000000000000000000000000..b1408662efb7a1766f2b4be0bbf259a71f8080ed --- /dev/null +++ b/Examples/xx-messenger/Sources/ResetAuthFeature/ResetAuthFeature.swift @@ -0,0 +1,27 @@ +import ComposableArchitecture +import XCTestDynamicOverlay +import XXClient + +public struct ResetAuthState: Equatable { + public init( + partner: Contact + ) { + self.partner = partner + } + + var partner: Contact +} + +public enum ResetAuthAction: Equatable {} + +public struct ResetAuthEnvironment { + public init() {} +} + +#if DEBUG +extension ResetAuthEnvironment { + public static let unimplemented = ResetAuthEnvironment() +} +#endif + +public let resetAuthReducer = Reducer<ResetAuthState, ResetAuthAction, ResetAuthEnvironment>.empty diff --git a/Examples/xx-messenger/Sources/ResetAuthFeature/ResetAuthView.swift b/Examples/xx-messenger/Sources/ResetAuthFeature/ResetAuthView.swift new file mode 100644 index 0000000000000000000000000000000000000000..76677a1c6cb2c8ae9c4759fcebdda8e135ae2271 --- /dev/null +++ b/Examples/xx-messenger/Sources/ResetAuthFeature/ResetAuthView.swift @@ -0,0 +1,39 @@ +import ComposableArchitecture +import SwiftUI + +public struct ResetAuthView: View { + public init(store: Store<ResetAuthState, ResetAuthAction>) { + self.store = store + } + + let store: Store<ResetAuthState, ResetAuthAction> + + struct ViewState: Equatable { + init(state: ResetAuthState) {} + } + + public var body: some View { + WithViewStore(store, observe: ViewState.init) { viewStore in + Form { + Text("Unimplemented") + } + .navigationTitle("Reset auth") + } + } +} + +#if DEBUG +public struct ResetAuthView_Previews: PreviewProvider { + public static var previews: some View { + NavigationView { + ResetAuthView(store: Store( + initialState: ResetAuthState( + partner: .unimplemented(Data()) + ), + reducer: .empty, + environment: () + )) + } + } +} +#endif diff --git a/Examples/xx-messenger/Tests/ResetAuthFeatureTests/ResetAuthFeatureTests.swift b/Examples/xx-messenger/Tests/ResetAuthFeatureTests/ResetAuthFeatureTests.swift new file mode 100644 index 0000000000000000000000000000000000000000..3721b662d7d2c5fe01cf66caf9eb237bc6d58d4e --- /dev/null +++ b/Examples/xx-messenger/Tests/ResetAuthFeatureTests/ResetAuthFeatureTests.swift @@ -0,0 +1,8 @@ +import XCTest +@testable import ResetAuthFeature + +final class ResetAuthFeatureTests: XCTestCase { + func testExample() { + XCTAssert(true) + } +}