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

[Team-05 iOS JEJE, 만사] OAuth 로그인 화면 & Issue 전체 조회 화면 #27

Open
wants to merge 50 commits into
base: team5
Choose a base branch
from

Conversation

ITzombietux
Copy link

목표

  • UI에 스토리보드와 Xib, 코드를 적절히 사용
  • MVVM + C 구조로 설계 및 구현
  • OAuth 로그인 Keychain 보안 관리

구현 기능

  1. 로그인, 이슈 등 화면 이동과 객체 상태 공유를 Coodinator를 사용하여 구현

  2. OAuth GitHub 기능 구현

  • 로그인 화면에서 로그인 버튼을 누르면 GitHub로그인 후 서버로부터 임시토큰 받아 옴
  • 임시토큰을 사용하여 서버로부터 JWT토큰을 받아 옴
  • JWT토큰을 앱 내에서 Keychain으로 저장 후 사용
  • 로그아웃 버튼을 누르면 Keychain에 저장된 JWT토큰 삭제 후 로그인 화면으로 전환
  1. 전체적인 UI구현
  • MainTabBarController를 중심으로 Tab마다 Custom Storyboard를 사용
  • 각 Custom Storyboard에 NavigationController를 사용
  • TableViewCell을 Xib로 구현
  • UIComponent를 재사용 할 수 있게 Custom으로 구현

zombietux and others added 30 commits June 7, 2021 17:43
@jung-yun jung-yun requested a review from mienne June 17, 2021 06:00
ehgud0670 pushed a commit that referenced this pull request Jun 17, 2021
ehgud0670 pushed a commit that referenced this pull request Jun 17, 2021
ehgud0670 pushed a commit that referenced this pull request Jun 17, 2021
ehgud0670 pushed a commit that referenced this pull request Jun 17, 2021
ehgud0670 pushed a commit that referenced this pull request Jun 17, 2021
ehgud0670 pushed a commit that referenced this pull request Jun 17, 2021
ehgud0670 pushed a commit that referenced this pull request Jun 17, 2021
ehgud0670 pushed a commit that referenced this pull request Jun 17, 2021
ehgud0670 pushed a commit that referenced this pull request Jun 17, 2021
Conflicts:
	iOS/issue-tracker/issue-tracker.xcodeproj/project.pbxproj
@mienne
Copy link

mienne commented Jun 22, 2021

안녕하세요. 일이 바쁜거랑 개인일이 겹쳐서 PR을 늦게 보게 되서 죄송합니다. 일 끝나고 오늘 저녁에 진행할 수 있도록 하겠습니다. 늦어져서 죄송합니다🙏

ksundong pushed a commit that referenced this pull request Jun 22, 2021
Copy link

@mienne mienne left a comment

Choose a reason for hiding this comment

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

  • 강제 옵셔널 코드가 보였습니다. 코드 작성할 때 사용한 의도는 있다고 생각합니다. 그러나, 강제 옵셔널 사용하지 않고 해결할 수 있는 방법이 있다면 그쪽으로 풀어가는 것이 좋습니다.
  • 사용하지 않는 코드에 대해서 따로 코멘트 남기지 않았습니다. 보이는대로 정리해주세요!
  • 여유가 있을 때 API 응답 실패, 성공 케이스에 대해서 응답 받을 때, Presentation 영역에서 어떻게 처리할지 고민하면 좋을거 같아요!
  • 추상화에 대해서 저도 배울 부분이 많이 있었습니다. 잘하셨습니다!!👏

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {

NotificationCenter.default.addObserver(forName: ASAuthorizationAppleIDProvider.credentialRevokedNotification, object: nil, queue: nil) { (notification) in
print("로그인 페이지로 이동")
Copy link

Choose a reason for hiding this comment

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

print보다 주석으로 사용하면 좋았을거 같아요!

import Foundation

struct IssueEndPoint {
static let scheme = "https"
Copy link

Choose a reason for hiding this comment

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

외부에서 사용하지 않는다면 private 접근제어자 사용하세요🤔

class IssueNetworkController {
private var requests: [URL: AnyObject] = [:]

init() {
Copy link

Choose a reason for hiding this comment

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

생성자 사용하지 않는다면 제거하세요🤔

}

func fetchIssues(completion: @escaping ([Issue]) -> Void) {
let req = IssueRequest()
Copy link

Choose a reason for hiding this comment

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

fetchIssues, deleteIssue 호출할 때마다 Request 객체 매번 생성하는 것보다 IssueNetworkController 생성하는 시점에서 한 번만 생성해서 사용해도 무방할거 같은데, 이 부분은 의견이 궁금합니다!

req.execute { (result) in
if let _ = result {
self.requests[requestURL] = nil
completion(result!)
Copy link

Choose a reason for hiding this comment

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

result! 강제 언래핑보다 if let 옵셔널 해제한 것으로 사용하세요🙂

// MARK: - HTTPStatusRequest
protocol HTTPStatusRequest: NetworkRequest {}

extension HTTPStatusRequest {
Copy link

Choose a reason for hiding this comment

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

현재 사용하지 않는거 같은데, HTTPStatusRequest 추상화한 목적이 무엇인지 궁금합니다!

return nil
}
let decoder = JSONDecoder()
decoder.dateDecodingStrategy = .iso8601
Copy link

Choose a reason for hiding this comment

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

만약 IssueRequest, IssuePatchRequest에서 dateDecodingStrategy 각각 다른 값으로 변경되어야 한다면 어떻게 대응해야 할까요?


import UIKit

extension UITableView {
Copy link

Choose a reason for hiding this comment

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

UITableView에서 어떤 것을 extension 한건지 알 수 있도록 파일명에서 드러나면 좋을거 같아요. 현재 같이 재사용과 관련된 부분이기 때문에 UITableView+Reusable 같이 작성하면 좋겠네요🙂

import UIKit

// MARK: Protocols
protocol Coordinator: class {
Copy link

Choose a reason for hiding this comment

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

Coordinator 파일, 코드 위치가 Domain Layer 보다 View와 연관있기 때문에 Presentation Layer로 이동해야겠네요.

self.layer.masksToBounds = true
}

required init?(coder: NSCoder) {
Copy link

Choose a reason for hiding this comment

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

지원하지 않는다면 아래와 같이 사용한다면 컴파일에서 경고나 오류로 표시할 수 있습니다. 참고만 해주세요!

Suggested change
required init?(coder: NSCoder) {
@available(*, unavailable, message: "TagLabel는 코드로만 생성할 수 있습니다.")
required init?(coder: NSCoder) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants