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

Add MyContactFeature library

parent 1f6824b2
No related branches found
No related tags found
2 merge requests!102Release 1.0.0,!98Messenger example - register, confirm, and unregister user facts
<?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 = "MyContactFeature"
BuildableName = "MyContactFeature"
BlueprintName = "MyContactFeature"
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 = "MyContactFeatureTests"
BuildableName = "MyContactFeatureTests"
BlueprintName = "MyContactFeatureTests"
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 = "MyContactFeature"
BuildableName = "MyContactFeature"
BlueprintName = "MyContactFeature"
ReferencedContainer = "container:">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
...@@ -26,6 +26,7 @@ let package = Package( ...@@ -26,6 +26,7 @@ let package = Package(
.library(name: "ContactFeature", targets: ["ContactFeature"]), .library(name: "ContactFeature", targets: ["ContactFeature"]),
.library(name: "ContactsFeature", targets: ["ContactsFeature"]), .library(name: "ContactsFeature", targets: ["ContactsFeature"]),
.library(name: "HomeFeature", targets: ["HomeFeature"]), .library(name: "HomeFeature", targets: ["HomeFeature"]),
.library(name: "MyContactFeature", targets: ["MyContactFeature"]),
.library(name: "RegisterFeature", targets: ["RegisterFeature"]), .library(name: "RegisterFeature", targets: ["RegisterFeature"]),
.library(name: "RestoreFeature", targets: ["RestoreFeature"]), .library(name: "RestoreFeature", targets: ["RestoreFeature"]),
.library(name: "SendRequestFeature", targets: ["SendRequestFeature"]), .library(name: "SendRequestFeature", targets: ["SendRequestFeature"]),
...@@ -216,6 +217,24 @@ let package = Package( ...@@ -216,6 +217,24 @@ let package = Package(
], ],
swiftSettings: swiftSettings swiftSettings: swiftSettings
), ),
.target(
name: "MyContactFeature",
dependencies: [
.target(name: "AppCore"),
.product(name: "ComposableArchitecture", package: "swift-composable-architecture"),
.product(name: "XXClient", package: "elixxir-dapps-sdk-swift"),
.product(name: "XXMessengerClient", package: "elixxir-dapps-sdk-swift"),
.product(name: "XXModels", package: "client-ios-db"),
],
swiftSettings: swiftSettings
),
.testTarget(
name: "MyContactFeatureTests",
dependencies: [
.target(name: "MyContactFeature"),
],
swiftSettings: swiftSettings
),
.target( .target(
name: "RegisterFeature", name: "RegisterFeature",
dependencies: [ dependencies: [
......
...@@ -109,6 +109,16 @@ ...@@ -109,6 +109,16 @@
ReferencedContainer = "container:.."> ReferencedContainer = "container:..">
</BuildableReference> </BuildableReference>
</TestableReference> </TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "MyContactFeatureTests"
BuildableName = "MyContactFeatureTests"
BlueprintName = "MyContactFeatureTests"
ReferencedContainer = "container:..">
</BuildableReference>
</TestableReference>
<TestableReference <TestableReference
skipped = "NO"> skipped = "NO">
<BuildableReference <BuildableReference
......
import ComposableArchitecture
import XCTestDynamicOverlay
public struct MyContactState: Equatable {
public init() {}
}
public enum MyContactAction: Equatable {
case start
}
public struct MyContactEnvironment {
public init() {}
}
#if DEBUG
extension MyContactEnvironment {
public static let unimplemented = MyContactEnvironment()
}
#endif
public let myContactReducer = Reducer<MyContactState, MyContactAction, MyContactEnvironment>
{ state, action, env in
switch action {
case .start:
return .none
}
}
import ComposableArchitecture
import SwiftUI
public struct MyContactView: View {
public init(store: Store<MyContactState, MyContactAction>) {
self.store = store
}
let store: Store<MyContactState, MyContactAction>
struct ViewState: Equatable {
init(state: MyContactState) {}
}
public var body: some View {
WithViewStore(store, observe: ViewState.init) { viewStore in
Form {
}
.navigationTitle("My Contact")
}
}
}
#if DEBUG
public struct MyContactView_Previews: PreviewProvider {
public static var previews: some View {
MyContactView(store: Store(
initialState: MyContactState(),
reducer: .empty,
environment: ()
))
}
}
#endif
import ComposableArchitecture
import XCTest
@testable import MyContactFeature
final class MyContactFeatureTests: XCTestCase {
func testStart() {
let store = TestStore(
initialState: MyContactState(),
reducer: myContactReducer,
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