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

Add MyIdentityFeature library to example app

parent 9c8cba1b
No related branches found
No related tags found
1 merge request!14[Example App] Make identity & contact
<?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 = "MyIdentityFeature"
BuildableName = "MyIdentityFeature"
BlueprintName = "MyIdentityFeature"
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 = "MyIdentityFeatureTests"
BuildableName = "MyIdentityFeatureTests"
BlueprintName = "MyIdentityFeatureTests"
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 = "MyIdentityFeature"
BuildableName = "MyIdentityFeature"
BlueprintName = "MyIdentityFeature"
ReferencedContainer = "container:">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
......@@ -48,6 +48,20 @@
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "MyIdentityFeature"
BuildableName = "MyIdentityFeature"
BlueprintName = "MyIdentityFeature"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
......@@ -101,6 +115,16 @@
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "MyIdentityFeatureTests"
BuildableName = "MyIdentityFeatureTests"
BlueprintName = "MyIdentityFeatureTests"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
......
......@@ -32,6 +32,10 @@ let package = Package(
name: "LandingFeature",
targets: ["LandingFeature"]
),
.library(
name: "MyIdentityFeature",
targets: ["MyIdentityFeature"]
),
.library(
name: "SessionFeature",
targets: ["SessionFeature"]
......@@ -132,6 +136,23 @@ let package = Package(
],
swiftSettings: swiftSettings
),
.target(
name: "MyIdentityFeature",
dependencies: [
.product(
name: "ComposableArchitecture",
package: "swift-composable-architecture"
),
],
swiftSettings: swiftSettings
),
.testTarget(
name: "MyIdentityFeatureTests",
dependencies: [
.target(name: "MyIdentityFeature"),
],
swiftSettings: swiftSettings
),
.target(
name: "SessionFeature",
dependencies: [
......
import ComposableArchitecture
public struct MyIdentityState: Equatable {
public init() {}
}
public enum MyIdentityAction: Equatable {}
public struct MyIdentityEnvironment {
public init() {}
}
public let myIdentityReducer = Reducer<MyIdentityState, MyIdentityAction, MyIdentityEnvironment>.empty
#if DEBUG
extension MyIdentityEnvironment {
public static let failing = MyIdentityEnvironment()
}
#endif
import ComposableArchitecture
import SwiftUI
public struct MyIdentityView: View {
public init(store: Store<MyIdentityState, MyIdentityAction>) {
self.store = store
}
let store: Store<MyIdentityState, MyIdentityAction>
struct ViewState: Equatable {
init(state: MyIdentityState) {}
}
public var body: some View {
WithViewStore(store.scope(state: ViewState.init)) { viewStore in
Text("MyIdentityView")
}
}
}
#if DEBUG
public struct MyIdentityView_Previews: PreviewProvider {
public static var previews: some View {
NavigationView {
MyIdentityView(store: .init(
initialState: .init(),
reducer: .empty,
environment: ()
))
}
.navigationViewStyle(.stack)
}
}
#endif
import ComposableArchitecture
import XCTest
@testable import MyIdentityFeature
final class MyIdentityFeatureTests: 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