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/186] 사용자 알림 설정 가져와서 반영하기 #188

Merged
merged 4 commits into from
Sep 16, 2021
Merged

Conversation

anyukyung
Copy link
Contributor

🌈 PR 요약

사용자 알림 설정 가져와서 반영했습니다..!

설정값을 가져온 후 바로 switch.isOn 값을 바꿔주니
UISwitch.isOn must be used from main thread only 라는 에러가 떴습니다.

왜인고 하니
UIKit문서에 가보면,

대부분의 경우, UIKit 클래스는 앱의 main thread에서만 사용해야 합니다.
이는 UIResponder에서 파생되거나 앱의 사용자 인터페이스를 조작하는 것과 관련하여 특히 그렇다고 합니다.

그래서 DispatchQueue.main.async를 끼워넣으니 잘되네용.
그냥 본적만 있었는데 왜쓰는지 알게 되었어요..ㅎ,ㅎ

📌 변경 사항

변경사항 및 주의 사항 (모듈 설치 등)을 적어주세요.

📸 ScreenShot
✅ PR check list
- commit message가 적절한지 확인해주세요. 
- 마지막으로 Coding Convention을 준수했는지 확인해주세요.
- 적절한 branch로 요청했는지 확인해주세요.
- Assignees, Label을 붙여주세요.
- 가능한 이슈를 Link 해주세요.
- PR이 승인된 경우 해당 브랜치는 삭제해주세요.

Linked Issue

close #186

let deletePeriod = UserDefaults.standard.integer(forKey: UserDefaults.Keys.deletePeriod)

self.pushAlarmSwitch.isOn = isPush
self.trashbinPeriodLabel.text = "\(deletePeriod)일"
Copy link
Member

Choose a reason for hiding this comment

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

trashbinPeriodLabel <- 이거 안 쓰이는건가여? 진석스가 삭제 했을라나...

@leeinae
Copy link
Member

leeinae commented Sep 15, 2021

DispatchQueue.main.async
유경이 천재 🧡🧡🧡

Comment on lines 3 to 10
- Firebase/Analytics (8.6.0):
- Firebase/Analytics (8.7.0):
- Firebase/Core
- Firebase/Core (8.6.0):
- Firebase/Core (8.7.0):
- Firebase/CoreOnly
- FirebaseAnalytics (~> 8.6.0)
- Firebase/CoreOnly (8.6.0):
- FirebaseCore (= 8.6.0)
- Firebase/Messaging (8.6.0):
- FirebaseAnalytics (~> 8.7.0)
- Firebase/CoreOnly (8.7.0):
- FirebaseCore (= 8.7.0)
- Firebase/Messaging (8.7.0):
Copy link
Member

Choose a reason for hiding this comment

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

pod update...!!!!! 하셧내요 - ㅅ -

Copy link
Member

Choose a reason for hiding this comment

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

낼 다시 생각해보자구 ...

@leeinae leeinae merged commit 9d7e106 into dev Sep 16, 2021
@leeinae leeinae deleted the feat/186 branch September 16, 2021 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feat] 푸시알림 스위치 서버 연결
2 participants