-
Notifications
You must be signed in to change notification settings - Fork 0
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
[IDLE-393] FCM SDK를 설치하고 해당 기능을 담당하는 객체를 만든다. #75
Conversation
|
||
// FireBase setting | ||
FirebaseApp.configure() | ||
|
||
// 앱실행시 알람수신 동의를 받음 | ||
UNUserNotificationCenter.current().delegate = self | ||
UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .badge, .sound], completionHandler: { _, _ in }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
푸시알림 권한 요청은 앱 실행시 바로하는것보다
앱 사용 중 알림과 관련된 페이지에서 하는게 사용자 경험에 좋습니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
푸시알림 권한 요청은 앱 실행시 바로하는것보다 앱 사용 중 알림과 관련된 페이지에서 하는게 사용자 경험에 좋습니다.
넵 해당부분 팀원들과 논의해보겠습니다!
} | ||
|
||
NotificationCenter.default.addObserver( | ||
forName: .requestDeleteTokenFromServer, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
로그아웃, 회원탈퇴 이후 호출되는 코드일 것 같습니다.
여기에서 FCM토큰을 없애는 작업을 진행하도록 함수 호출을 하고 있는데(내부 구현체는 없지만) 아마 내부 구현이 추가되면 정상동작 하지 않을거에요.
그 이유를 고민해봅시다~!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이유를 잘 모르겠습니다 멘토님🥲 힌트 주실 수 있으실까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
먼저 구현체에 어떤 내용을 작성할지 생각해봅시다 😎
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
구현체에는 서버로부터 FCM을 전송하기위한 객체와 유저정보를 가져오는 객체가 필요할 것 같습니다! 먼저 유저정보를 가져온 후 토큰을 서버로 전송하는 방법으로 개발할 것 같습니다
변경된 점
FCM토큰을 서버로 전송하는 프로세스 구현
FCM토큰 전송구조는 다음과 같이 구성됩니다.
현재 토큰시 서버로 전달헤야하는 유저정보가 명세되어 있지 않아 구체적인 전송작업은 구현하지 않았습니다.