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

[CAT-162] Feature: Splash 구현 #20

Merged
merged 6 commits into from
Aug 10, 2024
Merged

[CAT-162] Feature: Splash 구현 #20

merged 6 commits into from
Aug 10, 2024

Conversation

Jihyun247
Copy link
Collaborator

@Jihyun247 Jihyun247 commented Aug 8, 2024

[CAT-162] Feature: Splash 구현

무엇에 관한 PR 인가요? 🙋

Splash 기능 구현

어떤 것을 작업하셨나요? 🛠

  1. appCore onAppear 시 splash로 이동
  2. splash에서 database initialized 시 다음 이동 뷰 결정 로직 실행
  3. 이동 뷰 결정 로직

🌱 PR Point

위 3번의 이동 뷰 결정 로직 입니닷

1 디바이스 아이디가 키체인에 있는지 확인
--1-1 있다면 존재하는 토큰이 키체인에 있는지 확인
----1-1-1 있다면 유저디폴트에서 온보딩 끝냄 여부 확인
------1-1-1-1 끝냈다면 홈뷰로 이동
------1-1-1-2 안끝냈다면 온보딩뷰로 이동
----1-1-2 없다면 login()
--1-2 없다면 디바이스 아이디 발급, 키체인 저장 후 -> login()

디바이스 아이디가 매개변수인 login() 메서드
구현: 발급된 디바이스 아이디로 /tokens 로그인 -> 발급받은 token 키체인 저장 -> 온보딩 뷰로 이동

@Jihyun247 Jihyun247 added the enhancement New feature or request label Aug 8, 2024
@Jihyun247 Jihyun247 self-assigned this Aug 8, 2024
Copy link

linear bot commented Aug 8, 2024

devMinseok
devMinseok previously approved these changes Aug 9, 2024
Copy link
Member

@devMinseok devMinseok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생했어! 👍👍
사용하지 않는 불필요 모듈은 제거하면 좋을거 같앙

Projects/Feature/SplashFeature/Sources/SplashCore.swift Outdated Show resolved Hide resolved
Projects/Feature/SplashFeature/Sources/SplashCore.swift Outdated Show resolved Hide resolved
private func login(deviceID: String) -> Effect<Action> {
return .run { send in
let response = try await authService.login(deviceID: deviceID, apiClient: apiClient)
_ = keychainClient.create(key: KeychainKeys.accessToken.rawValue, data: response.accessToken)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

KeychainClient를 직접사용하지 않고 AuthService에서 사용하면 어떨까?
로그인 후 response를 받고 데이터를 저장하는것 까지 도메인에서 처리하는거지

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아하 조은생각이다 !!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

흠 그렇게 되면 authservice의 login()이 apiclient, keychianclient 두개를 모두 받는거구나

@Jihyun247
Copy link
Collaborator Author

고생했어! 👍👍 사용하지 않는 불필요 모듈은 제거하면 좋을거 같앙

사용하지 않는 모듈 머가 있지 ?? AppFeature 이거 삭제해도 되는건가 ?

@devMinseok
Copy link
Member

devMinseok commented Aug 10, 2024

사용하지 않는 모듈 머가 있지 ?? AppFeature 이거 삭제해도 되는건가 ?

Example, Tests, Testing 이런모듈타겟들은 사용안하면 그냥 제거 해줘! (ex: SplashExample)

@Jihyun247 Jihyun247 merged commit ea0ef95 into develop Aug 10, 2024
1 check passed
@Jihyun247 Jihyun247 deleted the feature/CAT-162 branch August 10, 2024 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants