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

Add BackupFeature library

parent 2118e7bf
No related branches found
No related tags found
2 merge requests!110Backup improvements & example,!102Release 1.0.0
<?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 = "BackupFeature"
BuildableName = "BackupFeature"
BlueprintName = "BackupFeature"
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 = "BackupFeatureTests"
BuildableName = "BackupFeatureTests"
BlueprintName = "BackupFeatureTests"
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 = "BackupFeature"
BuildableName = "BackupFeature"
BlueprintName = "BackupFeature"
ReferencedContainer = "container:">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
...@@ -15,6 +15,7 @@ let package = Package( ...@@ -15,6 +15,7 @@ let package = Package(
products: [ products: [
.library(name: "AppCore", targets: ["AppCore"]), .library(name: "AppCore", targets: ["AppCore"]),
.library(name: "AppFeature", targets: ["AppFeature"]), .library(name: "AppFeature", targets: ["AppFeature"]),
.library(name: "BackupFeature", targets: ["BackupFeature"]),
.library(name: "ChatFeature", targets: ["ChatFeature"]), .library(name: "ChatFeature", targets: ["ChatFeature"]),
.library(name: "CheckContactAuthFeature", targets: ["CheckContactAuthFeature"]), .library(name: "CheckContactAuthFeature", targets: ["CheckContactAuthFeature"]),
.library(name: "ConfirmRequestFeature", targets: ["ConfirmRequestFeature"]), .library(name: "ConfirmRequestFeature", targets: ["ConfirmRequestFeature"]),
...@@ -112,6 +113,21 @@ let package = Package( ...@@ -112,6 +113,21 @@ let package = Package(
], ],
swiftSettings: swiftSettings swiftSettings: swiftSettings
), ),
.target(
name: "BackupFeature",
dependencies: [
.product(name: "ComposableArchitecture", package: "swift-composable-architecture"),
.product(name: "XXMessengerClient", package: "elixxir-dapps-sdk-swift"),
],
swiftSettings: swiftSettings
),
.testTarget(
name: "BackupFeatureTests",
dependencies: [
.target(name: "BackupFeature"),
],
swiftSettings: swiftSettings
),
.target( .target(
name: "ChatFeature", name: "ChatFeature",
dependencies: [ dependencies: [
......
...@@ -49,6 +49,16 @@ ...@@ -49,6 +49,16 @@
ReferencedContainer = "container:.."> ReferencedContainer = "container:..">
</BuildableReference> </BuildableReference>
</TestableReference> </TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BackupFeatureTests"
BuildableName = "BackupFeatureTests"
BlueprintName = "BackupFeatureTests"
ReferencedContainer = "container:..">
</BuildableReference>
</TestableReference>
<TestableReference <TestableReference
skipped = "NO"> skipped = "NO">
<BuildableReference <BuildableReference
......
import ComposableArchitecture
import XCTestDynamicOverlay
public struct BackupState: Equatable {
public init() {}
}
public enum BackupAction: Equatable {
case start
}
public struct BackupEnvironment {
public init() {}
}
#if DEBUG
extension BackupEnvironment {
public static let unimplemented = BackupEnvironment()
}
#endif
public let backupReducer = Reducer<BackupState, BackupAction, BackupEnvironment>
{ state, action, env in
switch action {
case .start:
return .none
}
}
import ComposableArchitecture
import SwiftUI
public struct BackupView: View {
public init(store: Store<BackupState, BackupAction>) {
self.store = store
}
let store: Store<BackupState, BackupAction>
struct ViewState: Equatable {
init(state: BackupState) {}
}
public var body: some View {
WithViewStore(store, observe: ViewState.init) { viewStore in
Form {
}
.navigationTitle("Backup")
.task {
viewStore.send(.start)
}
}
}
}
#if DEBUG
public struct BackupView_Previews: PreviewProvider {
public static var previews: some View {
NavigationView {
BackupView(store: Store(
initialState: BackupState(),
reducer: .empty,
environment: ()
))
}
}
}
#endif
import ComposableArchitecture
import XCTest
@testable import BackupFeature
final class BackupFeatureTests: XCTestCase {
func testStart() {
let store = TestStore(
initialState: BackupState(),
reducer: backupReducer,
environment: .unimplemented
)
store.send(.start)
}
}
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