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

[Feat] #206 - 알림 권한 요청 다이얼로그 구현 #209

Merged
merged 8 commits into from
Jan 8, 2024

Conversation

yungu0010
Copy link
Member

🫧 작업한 내용

  • 알림권한 요청 다이얼로그 뷰를 구현했습니다.
  • 알림권한 요청 시기를 다이얼로그 뷰에서 하단 버튼을 누른 후로 변경했습니다.

🔫 PR Point

🥲

  • 로그인 이후 알림권한을 요청하도록 로직이 작성되었는데, 기존에는 로그인 API를 호출할 때 fcmToken을 서버로 전달하고 있어 현재 코드대로라면 유저가 알림권한을 허용, 비허용하는 것과 관계없이 fcmToken을 저장하게 되는데 상관 없을까요?
  • 뭔가 .. 뷰컨을 호출하는 것도 메인스레드에서 해야해서 디스패치큐를 남발하는 코드가 되었는데, , 좋은 코드인지 잘 모르겠습니다

📸 스크린샷

KakaoTalk_Video_2023-11-23-21-14-59.mp4

📮 관련 이슈

@yungu0010 yungu0010 added this to the SP4 milestone Nov 23, 2023
@yungu0010 yungu0010 self-assigned this Nov 23, 2023
Comment on lines 253 to 259
if let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene,
let window = windowScene.windows.first {
let tabBarController = TabBarController()
let navigationController = UINavigationController(rootViewController: tabBarController)
navigationController.isNavigationBarHidden = true
window.rootViewController = navigationController
window.makeKeyAndVisible()
Copy link
Member

Choose a reason for hiding this comment

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

#193 액세스 토큰 로직처리하면서 SceneDelgate에 changeRootViewControllerTo 메서드를 만들어뒀어여! #193 머지 후에 아래와 같이 변경해도 좋을 것 같아욤 :)

Suggested change
if let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene,
let window = windowScene.windows.first {
let tabBarController = TabBarController()
let navigationController = UINavigationController(rootViewController: tabBarController)
navigationController.isNavigationBarHidden = true
window.rootViewController = navigationController
window.makeKeyAndVisible()
SceneDelegate.shared?.changeRootViewControllerTo(TabBarController())

Copy link
Member Author

Choose a reason for hiding this comment

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

헉 감사합니다!! #193 머지 후 수정하겠습니다 :)

}

func requestNotification() {
// UNUserNotificationCenter.current().delegate = self
Copy link
Member

@jeongdung-eo jeongdung-eo Nov 26, 2023

Choose a reason for hiding this comment

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

사용하지 않는 코드 지워주세욤 :)

- 하단 버튼을 눌렀을 때 알람권한을 요청하도록 수정
- 코드리뷰 반영
- changeRootViewControllerTo로 변경
- 불필요한 코드 수정 및 주석 삭제
@yungu0010 yungu0010 merged commit db5c5ed into develop Jan 8, 2024
1 check passed
@yungu0010 yungu0010 deleted the feature/#206 branch January 8, 2024 05:25
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.

[Feat] 알림 권한 요청 다이얼로그 구현
2 participants