뱃지카운트 자체는 서버에서 내려준대로 해야되서 난감했는데
따로 설정가능한 기능이있었다
application.applicationIconBadgeNumber = 0
이거 인데 설정해줬더니
디플리케이션 경고가 뜬다.
해서 권장해주는 방법 대로 변경
if #available(iOS 16.0, *) {
UNUserNotificationCenter.current().setBadgeCount(0) { _ in }
} else {
application.applicationIconBadgeNumber = 0
}
17부터 디플인데 왜 16으로 해주라는건지는 모르겠다.
'iOS > swift' 카테고리의 다른 글
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 |
ios - Admob 에러코드 메모 (0) | 2023.03.21 |
XCTest, textFields["passwordTextField"] 는 찾을 수 없다. (0) | 2022.10.31 |