Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

πŸ”€ :: Signin νŽ˜μ΄μ§€ μ œμž‘ #27

Merged
merged 42 commits into from
May 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
3a8337b
:sparkles: Add SiginFeature
kimsh153 Apr 23, 2023
0021dd1
:pencil2: Dotori -> SMS
kimsh153 Apr 23, 2023
5fd838a
:wrench: SiginFactory 생성
kimsh153 Apr 23, 2023
5d218df
:package: GAuthSignin μΆ”κ°€
kimsh153 Apr 23, 2023
8ea1173
:package: Needle 생성
kimsh153 Apr 23, 2023
7cbf02f
:label: intent, model public으둜 λ³€κ²½
kimsh153 Apr 24, 2023
0f30773
:construction: μž„μ‹œ 컀밋
kimsh153 Apr 24, 2023
8c8ab5b
:hammer: NeedleRunScript μΆ”κ°€
kimsh153 Apr 24, 2023
55d86e1
:package: Needle μΆ”κ°€
kimsh153 Apr 24, 2023
ded375a
:sparkles: KeychainComponent
kimsh153 Apr 24, 2023
613dbb9
:sparkles: KeychainComponentProtocol 생성
kimsh153 Apr 24, 2023
644a364
:fire: NeedleModule μ‚­μ œ
kimsh153 Apr 24, 2023
32b1217
:heavy_plus_sign: JwtStoreComponent
kimsh153 Apr 24, 2023
00bca12
:sparkles: SwiftLint.yml
kimsh153 Apr 24, 2023
b96e5b0
:heavy_plus_sign: AuthDomainComponentProtocol 생성
kimsh153 Apr 24, 2023
bc27fb7
:heavy_plus_sign: AuthDomainComponent 생성
kimsh153 Apr 24, 2023
effee81
:fire: Needle 방식 λ°”κΎΈλ©΄μ„œ ν•„μš”ν•˜μ§€ μ•Šμ€ μ½”λ“œ μ§€μš°κΈ°
kimsh153 Apr 24, 2023
c83eb06
:sparkles: SMSApp SigninComponent μ—°κ²°
kimsh153 Apr 24, 2023
bc794db
:heavy_plus_sign: μ˜μ‘΄μ„± μ£Όμž…
kimsh153 Apr 24, 2023
3290e15
:heavy_plus_sign: SigninComponent
kimsh153 Apr 24, 2023
8a5e0bd
:heavy_plus_sign: SigninDependency μΆ”κ°€
kimsh153 Apr 24, 2023
203896c
:bento: DesignSystem Background Image μΆ”κ°€
kimsh153 Apr 30, 2023
c12aace
:iphone: SMSImage μ œμž‘
kimsh153 Apr 30, 2023
a563068
:fire: μ•ˆμ“°λŠ” μ½”λ“œ μ§€μš°κΈ°
kimsh153 Apr 30, 2023
aed66c1
:lock: XCConfig μ„€μ •
kimsh153 Apr 30, 2023
bf54ba9
:coffin: AppDelegate
kimsh153 Apr 30, 2023
70c4398
:lipstick: SigninUI
kimsh153 Apr 30, 2023
2f044c2
Merge branch 'master' of https://github.com/GSM-MSG/SMS-iOS into 23-f…
kimsh153 Apr 30, 2023
0f23e29
Update Projects/Core/JwtStore/Interface/DI/JwtStoreComponentProtocol.…
kimsh153 Apr 30, 2023
b2c3eb8
Update Projects/Core/JwtStore/Sources/DI/JwtStoreComponent.swift
kimsh153 Apr 30, 2023
4be99bb
Update Projects/Feature/SigninFeature/Sources/Scene/SigninView.swift
baekteun Apr 30, 2023
04564ff
Update Projects/Domain/AuthDomain/Project.swift
kimsh153 Apr 30, 2023
eb4ac6a
Update Projects/Domain/AuthDomain/Sources/DI/AuthDomainComponent.swift
kimsh153 Apr 30, 2023
7a6e5c7
Update Projects/Feature/BaseFeature/Project.swift
kimsh153 Apr 30, 2023
252bcd5
Update Projects/Feature/SigninFeature/Sources/Intent/SigninIntent.swift
kimsh153 Apr 30, 2023
912ba5e
:recycle: Comment μˆ˜μ •
kimsh153 Apr 30, 2023
de8eb41
:recycle: Comment μˆ˜μ •
kimsh153 May 1, 2023
17739d6
Update Projects/Feature/SigninFeature/Project.swift
kimsh153 May 1, 2023
e0de8da
Update Projects/Feature/SigninFeature/Project.swift
kimsh153 May 1, 2023
5901fd8
Update Projects/Shared/KeychainModule/Sources/DI/KeychainComponent.swift
kimsh153 May 1, 2023
303138a
:fire: remove code
kimsh153 May 1, 2023
7b7fa21
Update Projects/Feature/SigninFeature/Sources/Scene/SigninView.swift
kimsh153 May 1, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .tuist-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.17.0
3.18.0
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ public extension TargetDependency {
}

public extension TargetDependency.SPM {
static let Needle = TargetDependency.external(name: "NeedleFoundation")
static let GAuthSignin = TargetDependency.external(name: "GAuthSignin")
static let Nimble = TargetDependency.external(name: "Nimble")
static let Quick = TargetDependency.external(name: "Quick")
static let Emdpoint = TargetDependency.external(name: "Emdpoint")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ public extension TargetDependency {
}

public extension TargetDependency.Feature {
static let SigninFeatureInterface = TargetDependency.project(
target: ModulePaths.Feature.SigninFeature.targetName(type: .interface),
path: .relativeToFeature(ModulePaths.Feature.SigninFeature.rawValue)
)
static let SigninFeature = TargetDependency.project(
target: ModulePaths.Feature.SigninFeature.targetName(type: .sources),
path: .relativeToFeature(ModulePaths.Feature.SigninFeature.rawValue)
)
static let BaseFeature = TargetDependency.project(
target: ModulePaths.Feature.BaseFeature.targetName(type: .sources),
path: .relativeToFeature(ModulePaths.Feature.BaseFeature.rawValue)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ public enum ModulePaths {

public extension ModulePaths {
enum Feature: String {
case SigninFeature
case BaseFeature

func targetName(type: MicroTargetType) -> String {
Expand Down
3 changes: 3 additions & 0 deletions Projects/App/.swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
excluded:
- "**/*/NeedleGenerated.swift"
- "Tuist"
9 changes: 7 additions & 2 deletions Projects/App/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ let settings: Settings =
configurations: configurations,
defaultSettings: .recommended)

let scripts: [TargetScript] = isCI ? [] : [.swiftLint]
let scripts: [TargetScript] = isCI ? [] : [.swiftLint, .needle]

let targets: [Target] = [
.init(
Expand All @@ -36,7 +36,12 @@ let targets: [Target] = [
sources: ["Sources/**"],
resources: ["Resources/**"],
scripts: scripts,
dependencies: [],
dependencies: [
.Feature.SigninFeature,
.Domain.AuthDomain,
.Core.JwtStore,
.Shared.KeychainModule
],
settings: .settings(base: env.baseSetting)
)
]
Expand Down
30 changes: 0 additions & 30 deletions Projects/App/Sources/Application/AppDelegate.swift

This file was deleted.

33 changes: 33 additions & 0 deletions Projects/App/Sources/Application/DI/AppComponent.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import NeedleFoundation
import SwiftUI
import AuthDomainInterface
import AuthDomain
import SigninFeature
import SigninFeatureInterface
import BaseDomain
import JwtStore
import JwtStoreInterface
import KeychainModule
import KeychainModuleInterface

final class AppComponent: BootstrapComponent {
func makeRootView() -> some View {
signinBuildable.makeView().eraseToAnyView()
}

var signinBuildable: any SigninBuildable {
SigninComponent(parent: self)
}

var authDomainBuildable: any AuthDomainBuildable {
AuthDomainComponent(parent: self)
}

var jwtStoreBuildable: any JwtStoreBuildable {
JwtStoreComponent(parent: self)
}

var keychainBuildable: any KeychainBuildable {
KeychainComponent(parent: self)
}
}
124 changes: 124 additions & 0 deletions Projects/App/Sources/Application/NeedleGenerated.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@


import AuthDomain
import AuthDomainInterface
import BaseDomain
import BaseFeature
import JwtStore
import JwtStoreInterface
import KeychainModule
import KeychainModuleInterface
import NeedleFoundation
import SigninFeature
import SigninFeatureInterface
import SwiftUI

// swiftlint:disable unused_declaration
private let needleDependenciesHash : String? = nil

// MARK: - Traversal Helpers

private func parent1(_ component: NeedleFoundation.Scope) -> NeedleFoundation.Scope {
return component.parent
}

// MARK: - Providers

#if !NEEDLE_DYNAMIC

private class JwtStoreDependency5613ee3d4fea5093f6faProvider: JwtStoreDependency {
var keychainBuildable: any KeychainBuildable {
return appComponent.keychainBuildable
}
private let appComponent: AppComponent
init(appComponent: AppComponent) {
self.appComponent = appComponent
}
}
/// ^->AppComponent->JwtStoreComponent
private func factoryb27d5aae1eb7e73575a6f47b58f8f304c97af4d5(_ component: NeedleFoundation.Scope) -> AnyObject {
return JwtStoreDependency5613ee3d4fea5093f6faProvider(appComponent: parent1(component) as! AppComponent)
}
private class SigninDependencyde06a9d0b22764487733Provider: SigninDependency {
var authDomainBuildable: any AuthDomainBuildable {
return appComponent.authDomainBuildable
}
private let appComponent: AppComponent
init(appComponent: AppComponent) {
self.appComponent = appComponent
}
}
/// ^->AppComponent->SigninComponent
private func factory2882a056d84a613debccf47b58f8f304c97af4d5(_ component: NeedleFoundation.Scope) -> AnyObject {
return SigninDependencyde06a9d0b22764487733Provider(appComponent: parent1(component) as! AppComponent)
}
private class AuthDomainDependency4518b8977185a5c9ff71Provider: AuthDomainDependency {
var jwtStoreBuildable: any JwtStoreBuildable {
return appComponent.jwtStoreBuildable
}
private let appComponent: AppComponent
init(appComponent: AppComponent) {
self.appComponent = appComponent
}
}
/// ^->AppComponent->AuthDomainComponent
private func factoryc9b20c320bb79402d4c1f47b58f8f304c97af4d5(_ component: NeedleFoundation.Scope) -> AnyObject {
return AuthDomainDependency4518b8977185a5c9ff71Provider(appComponent: parent1(component) as! AppComponent)
}

#else
extension JwtStoreComponent: Registration {
public func registerItems() {
keyPathToName[\JwtStoreDependency.keychainBuildable] = "keychainBuildable-any KeychainBuildable"
}
}
extension AppComponent: Registration {
public func registerItems() {


}
}
extension KeychainComponent: Registration {
public func registerItems() {

}
}
extension SigninComponent: Registration {
public func registerItems() {
keyPathToName[\SigninDependency.authDomainBuildable] = "authDomainBuildable-any AuthDomainBuildable"
}
}
extension AuthDomainComponent: Registration {
public func registerItems() {
keyPathToName[\AuthDomainDependency.jwtStoreBuildable] = "jwtStoreBuildable-any JwtStoreBuildable"
}
}


#endif

private func factoryEmptyDependencyProvider(_ component: NeedleFoundation.Scope) -> AnyObject {
return EmptyDependencyProvider(component: component)
}

// MARK: - Registration
private func registerProviderFactory(_ componentPath: String, _ factory: @escaping (NeedleFoundation.Scope) -> AnyObject) {
__DependencyProviderRegistry.instance.registerDependencyProviderFactory(for: componentPath, factory)
}

#if !NEEDLE_DYNAMIC

private func register1() {
registerProviderFactory("^->AppComponent->JwtStoreComponent", factoryb27d5aae1eb7e73575a6f47b58f8f304c97af4d5)
registerProviderFactory("^->AppComponent", factoryEmptyDependencyProvider)
registerProviderFactory("^->AppComponent->KeychainComponent", factoryEmptyDependencyProvider)
registerProviderFactory("^->AppComponent->SigninComponent", factory2882a056d84a613debccf47b58f8f304c97af4d5)
registerProviderFactory("^->AppComponent->AuthDomainComponent", factoryc9b20c320bb79402d4c1f47b58f8f304c97af4d5)
}
#endif

public func registerProviderFactories() {
#if !NEEDLE_DYNAMIC
register1()
#endif
}
16 changes: 16 additions & 0 deletions Projects/App/Sources/Application/SMSApp.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import BaseFeature
import DesignSystem
import SwiftUI

@main
struct SMSApp: App {
init() {
registerProviderFactories()
}

var body: some Scene {
WindowGroup {
AppComponent().makeRootView()
}
}
}
24 changes: 0 additions & 24 deletions Projects/App/Sources/Application/SceneDelegate.swift

This file was deleted.

6 changes: 4 additions & 2 deletions Projects/App/Support/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CLIENT_ID</key>
<string>$(CLIENT_ID)</string>
<key>REDIREDCT_URI</key>
<string>$(REDIREDCT_URI)</string>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
Expand Down Expand Up @@ -31,8 +35,6 @@
<dict>
<key>UISceneConfigurationName</key>
<string>Default Configuration</string>
<key>UISceneDelegateClassName</key>
<string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
</dict>
</array>
</dict>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "Background.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Background 1.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Background 2.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
31 changes: 31 additions & 0 deletions Projects/Core/DesignSystem/Sources/Image/SMSImage.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import SwiftUI

public struct SMSImage: View {
public enum Image {
case background
}

private var image: Image
private var renderingMode: SwiftUI.Image.TemplateRenderingMode

public init(
_ image: Image,
renderingMode: SwiftUI.Image.TemplateRenderingMode = .original
) {
self.image = image
self.renderingMode = renderingMode
}

public var body: some View {
smsImageToImage()
.resizable()
.renderingMode(renderingMode)
}

private func smsImageToImage() -> SwiftUI.Image {
switch image {
case .background:
return DesignSystemAsset.Images.background.swiftUIImage
}
}
}
5 changes: 5 additions & 0 deletions Projects/Core/JwtStore/Interface/DI/JwtStoreBuildable.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import NeedleFoundation

public protocol JwtStoreBuildable {
var jwtStore: any JwtStore { get }
}
13 changes: 13 additions & 0 deletions Projects/Core/JwtStore/Sources/DI/JwtStoreComponent.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import JwtStoreInterface
import KeychainModuleInterface
import NeedleFoundation

public protocol JwtStoreDependency: Dependency {
var keychainBuildable: any KeychainBuildable { get }
}

public final class JwtStoreComponent: Component<JwtStoreDependency>, JwtStoreBuildable {
public var jwtStore: any JwtStore {
KeychainJwtStore(keychain: dependency.keychainBuildable.keychain)
}
}
Loading