Skip to content
Snippets Groups Projects
Commit 632620f4 authored by Dariusz Rybicki's avatar Dariusz Rybicki
Browse files

Add ErrorFeature to example app

parent 692e7e1b
No related branches found
No related tags found
1 merge request!1Client management
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1340"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "ErrorFeature"
BuildableName = "ErrorFeature"
BlueprintName = "ErrorFeature"
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 = "ErrorFeatureTests"
BuildableName = "ErrorFeatureTests"
BlueprintName = "ErrorFeatureTests"
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 = "ErrorFeature"
BuildableName = "ErrorFeature"
BlueprintName = "ErrorFeature"
ReferencedContainer = "container:">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
...@@ -20,6 +20,20 @@ ...@@ -20,6 +20,20 @@
ReferencedContainer = "container:"> ReferencedContainer = "container:">
</BuildableReference> </BuildableReference>
</BuildActionEntry> </BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "ErrorFeature"
BuildableName = "ErrorFeature"
BlueprintName = "ErrorFeature"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry <BuildActionEntry
buildForTesting = "YES" buildForTesting = "YES"
buildForRunning = "YES" buildForRunning = "YES"
...@@ -67,6 +81,16 @@ ...@@ -67,6 +81,16 @@
ReferencedContainer = "container:"> ReferencedContainer = "container:">
</BuildableReference> </BuildableReference>
</TestableReference> </TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "ErrorFeatureTests"
BuildableName = "ErrorFeatureTests"
BlueprintName = "ErrorFeatureTests"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
<TestableReference <TestableReference
skipped = "NO"> skipped = "NO">
<BuildableReference <BuildableReference
......
...@@ -24,6 +24,10 @@ let package = Package( ...@@ -24,6 +24,10 @@ let package = Package(
name: "AppFeature", name: "AppFeature",
targets: ["AppFeature"] targets: ["AppFeature"]
), ),
.library(
name: "ErrorFeature",
targets: ["ErrorFeature"]
),
.library( .library(
name: "LandingFeature", name: "LandingFeature",
targets: ["LandingFeature"] targets: ["LandingFeature"]
...@@ -80,6 +84,27 @@ let package = Package( ...@@ -80,6 +84,27 @@ let package = Package(
], ],
swiftSettings: swiftSettings swiftSettings: swiftSettings
), ),
.target(
name: "ErrorFeature",
dependencies: [
.product(
name: "ComposableArchitecture",
package: "swift-composable-architecture"
),
.product(
name: "ElixxirDAppsSDK",
package: "elixxir-dapps-sdk-swift"
),
],
swiftSettings: swiftSettings
),
.testTarget(
name: "ErrorFeatureTests",
dependencies: [
.target(name: "ErrorFeature"),
],
swiftSettings: swiftSettings
),
.target( .target(
name: "LandingFeature", name: "LandingFeature",
dependencies: [ dependencies: [
......
import ComposableArchitecture
import SwiftUI
public struct ErrorState: Equatable {
public init() {}
}
public enum ErrorAction: Equatable {}
public struct ErrorEnvironment {
public init() {}
}
public let errorReducer = Reducer<ErrorState, ErrorAction, ErrorEnvironment>.empty
#if DEBUG
extension ErrorEnvironment {
public static let failing = ErrorEnvironment()
}
#endif
import ComposableArchitecture
import SwiftUI
public struct ErrorView: View {
public init(store: Store<ErrorState, ErrorAction>) {
self.store = store
}
let store: Store<ErrorState, ErrorAction>
struct ViewState: Equatable {
init(state: ErrorState) {}
}
public var body: some View {
WithViewStore(store.scope(state: ViewState.init)) { viewStore in
Text("ErrorView")
}
}
}
#if DEBUG
public struct ErrorView_Previews: PreviewProvider {
public static var previews: some View {
ErrorView(store: .init(
initialState: .init(),
reducer: .empty,
environment: ()
))
}
}
#endif
import XCTest
@testable import ErrorFeature
final class ErrorFeatureTests: XCTestCase {
func testExample() {
XCTAssert(true)
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment