-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #192 from Nexters/release/1.0.1
v1.0.1 Release -> Main
- Loading branch information
Showing
33 changed files
with
358 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// | ||
// UserClient.swift | ||
// DomainUserInterface | ||
// | ||
// Created by 임현규 on 8/22/24. | ||
// | ||
|
||
import Foundation | ||
|
||
public struct UserClient { | ||
private let _isLoggedIn: () -> Bool | ||
private let _isAppDeleted: () -> Bool | ||
private let updateLoginState: (Bool) -> Void | ||
private let updateDeleteState: (Bool) -> Void | ||
|
||
public init( | ||
isLoggedIn: @escaping () -> Bool, | ||
isAppDeleted: @escaping () -> Bool, | ||
updateLoginState: @escaping (Bool) -> Void, | ||
updateDeleteState: @escaping (Bool) -> Void | ||
) { | ||
self._isLoggedIn = isLoggedIn | ||
self._isAppDeleted = isAppDeleted | ||
self.updateLoginState = updateLoginState | ||
self.updateDeleteState = updateDeleteState | ||
} | ||
|
||
public func isLoggedIn() -> Bool { | ||
_isLoggedIn() | ||
} | ||
|
||
public func isAppDeleted() -> Bool { | ||
_isAppDeleted() | ||
} | ||
|
||
public func updateLoginState(isLoggedIn: Bool) { | ||
updateLoginState(isLoggedIn) | ||
} | ||
|
||
public func updateDeleteState(isDelete: Bool) { | ||
updateDeleteState(isDelete) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import ProjectDescription | ||
import ProjectDescriptionHelpers | ||
import DependencyPlugin | ||
|
||
let project = Project.makeModule( | ||
name: ModulePath.Domain.name+ModulePath.Domain.User.rawValue, | ||
targets: [ | ||
.domain( | ||
interface: .User, | ||
factory: .init(dependencies: [ | ||
.core | ||
]) | ||
), | ||
.domain( | ||
implements: .User, | ||
factory: .init( | ||
dependencies: [ | ||
.domain(interface: .User) | ||
] | ||
) | ||
), | ||
|
||
.domain( | ||
testing: .User, | ||
factory: .init( | ||
dependencies: [ | ||
.domain(interface: .User) | ||
] | ||
) | ||
), | ||
.domain( | ||
tests: .User, | ||
factory: .init( | ||
dependencies: [ | ||
.domain(testing: .User), | ||
.domain(implements: .User) | ||
] | ||
) | ||
), | ||
|
||
] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// | ||
// UserClient.swift | ||
// DomainUser | ||
// | ||
// Created by 임현규 on 8/22/24. | ||
// | ||
|
||
import Foundation | ||
|
||
import DomainUserInterface | ||
|
||
import CoreKeyChainStore | ||
|
||
import ComposableArchitecture | ||
|
||
extension UserClient: DependencyKey { | ||
static public var liveValue: UserClient = .live() | ||
|
||
static func live() -> UserClient { | ||
return .init( | ||
isLoggedIn: { | ||
return UserDefaults.standard.bool(forKey: "loginState") | ||
}, | ||
|
||
isAppDeleted: { | ||
return !UserDefaults.standard.bool(forKey: "deleteState") | ||
}, | ||
|
||
updateLoginState: { isLoggedIn in | ||
UserDefaults.standard.set(isLoggedIn, forKey: "loginState") | ||
}, | ||
|
||
updateDeleteState: { isDelete in | ||
UserDefaults.standard.set(!isDelete, forKey: "deleteState") | ||
} | ||
) | ||
} | ||
} | ||
|
||
extension DependencyValues { | ||
public var userClient: UserClient { | ||
get { self[UserClient.self] } | ||
set { self[UserClient.self] = newValue } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
// This is for Tuist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import XCTest | ||
|
||
final class UserTests: XCTestCase { | ||
override func setUpWithError() throws {} | ||
|
||
override func tearDownWithError() throws {} | ||
|
||
func testExample() { | ||
XCTAssertEqual(1, 1) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.