Skip to content

Commit

Permalink
修复加密推送角标
Browse files Browse the repository at this point in the history
  • Loading branch information
Finb committed Dec 11, 2024
1 parent 05d6ada commit 4a2bf08
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ class CiphertextProcessor: NotificationContentProcessor {
soundName = sound
bestAttemptContent.sound = UNNotificationSound(named: UNNotificationSoundName(rawValue: sound))
}
if let badge = map["badge"] as? Int {
bestAttemptContent.badge = badge as NSNumber
if let badge = map["badge"] as? String, let badgeValue = Int(badge) {
bestAttemptContent.badge = badgeValue as NSNumber
}
var aps: [String: Any] = ["alert": alert]
if let soundName {
Expand Down

0 comments on commit 4a2bf08

Please sign in to comment.