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

Add ContactFeature library

parent 976cf766
No related branches found
No related tags found
2 merge requests!102Release 1.0.0,!68Messenger example - send auth request
<?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 = "ContactFeature"
BuildableName = "ContactFeature"
BlueprintName = "ContactFeature"
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 = "ContactFeatureTests"
BuildableName = "ContactFeatureTests"
BlueprintName = "ContactFeatureTests"
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 = "ContactFeature"
BuildableName = "ContactFeature"
BlueprintName = "ContactFeature"
ReferencedContainer = "container:">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
...@@ -20,6 +20,7 @@ let package = Package( ...@@ -20,6 +20,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: "ContactFeature", targets: ["ContactFeature"]),
.library(name: "HomeFeature", targets: ["HomeFeature"]), .library(name: "HomeFeature", targets: ["HomeFeature"]),
.library(name: "RegisterFeature", targets: ["RegisterFeature"]), .library(name: "RegisterFeature", targets: ["RegisterFeature"]),
.library(name: "RestoreFeature", targets: ["RestoreFeature"]), .library(name: "RestoreFeature", targets: ["RestoreFeature"]),
...@@ -87,6 +88,23 @@ let package = Package( ...@@ -87,6 +88,23 @@ let package = Package(
], ],
swiftSettings: swiftSettings swiftSettings: swiftSettings
), ),
.target(
name: "ContactFeature",
dependencies: [
.target(name: "AppCore"),
.product(name: "ComposableArchitecture", package: "swift-composable-architecture"),
.product(name: "XXMessengerClient", package: "elixxir-dapps-sdk-swift"),
.product(name: "XXModels", package: "client-ios-db"),
],
swiftSettings: swiftSettings
),
.testTarget(
name: "ContactFeatureTests",
dependencies: [
.target(name: "ContactFeature"),
],
swiftSettings: swiftSettings
),
.target( .target(
name: "HomeFeature", name: "HomeFeature",
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 = "ContactFeatureTests"
BuildableName = "ContactFeatureTests"
BlueprintName = "ContactFeatureTests"
ReferencedContainer = "container:..">
</BuildableReference>
</TestableReference>
<TestableReference <TestableReference
skipped = "NO"> skipped = "NO">
<BuildableReference <BuildableReference
......
import ComposableArchitecture
import XCTestDynamicOverlay
public struct ContactState: Equatable {
public init() {}
}
public enum ContactAction: Equatable {
case start
}
public struct ContactEnvironment {
public init() {}
}
#if DEBUG
extension ContactEnvironment {
public static let unimplemented = ContactEnvironment()
}
#endif
public let contactReducer = Reducer<ContactState, ContactAction, ContactEnvironment>
{ state, action, env in
switch action {
case .start:
return .none
}
}
import ComposableArchitecture
import SwiftUI
public struct ContactView: View {
public init(store: Store<ContactState, ContactAction>) {
self.store = store
}
let store: Store<ContactState, ContactAction>
struct ViewState: Equatable {
init(state: ContactState) {}
}
public var body: some View {
WithViewStore(store.scope(state: ViewState.init)) { viewStore in
Form {
}
.navigationTitle("Contact")
}
}
}
#if DEBUG
public struct ContactView_Previews: PreviewProvider {
public static var previews: some View {
ContactView(store: Store(
initialState: ContactState(),
reducer: .empty,
environment: ()
))
}
}
#endif
import ComposableArchitecture
import XCTest
@testable import ContactFeature
final class ContactFeatureTests: XCTestCase {
func testStart() {
let store = TestStore(
initialState: ContactState(),
reducer: contactReducer,
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