뱃지카운트 자체는 서버에서 내려준대로 해야되서 난감했는데
따로 설정가능한 기능이있었다
application.applicationIconBadgeNumber = 0
이거 인데 설정해줬더니
디플리케이션 경고가 뜬다.
해서 권장해주는 방법 대로 변경
if #available(iOS 16.0, *) {
UNUserNotificationCenter.current().setBadgeCount(0) { _ in }
} else {
application.applicationIconBadgeNumber = 0
}
17부터 디플인데 왜 16으로 해주라는건지는 모르겠다.
반응형
'iOS > swift' 카테고리의 다른 글
background audio play - 2 [AVAudioSession] (1) | 2024.09.15 |
---|---|
background audio play - 1 [AVAudioPlayer] (2) | 2024.09.12 |
SwiftUI Basic Components (0) | 2023.06.13 |
GIDSignIn.~.signIn(with: config ~) Type of expression is ambiguous without more context (0) | 2023.04.12 |
No such module ~~ 설치되지 않는 Snapkit 문제 (0) | 2023.04.12 |