[] 푸시 수신 부 약간 변경

This commit is contained in:
김선규 2025-03-06 17:56:31 +09:00
parent 05f11df5e8
commit 655144a2ee
2 changed files with 13 additions and 0 deletions

View File

@ -100,6 +100,7 @@ extension AppDelegate: UNUserNotificationCenterDelegate {
// //
func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification) async -> UNNotificationPresentationOptions { func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification) async -> UNNotificationPresentationOptions {
let userInfo = notification.request.content.userInfo let userInfo = notification.request.content.userInfo
printLog(userInfo)
if let apsData = userInfo["aps"] as? [AnyHashable: Any], if let apsData = userInfo["aps"] as? [AnyHashable: Any],
let badge = apsData["badge"] as? Int { let badge = apsData["badge"] as? Int {
@ -111,6 +112,18 @@ extension AppDelegate: UNUserNotificationCenterDelegate {
} }
} }
if let bid = userInfo["bid"] as? String {
printLog("bid = \(bid)")
}
if let content = userInfo["content"] as? String {
printLog("content = \(content)")
}
if let pid = userInfo["pid"] as? String {
printLog("pid = \(pid)")
}
if #available(iOS 14.0, *) { if #available(iOS 14.0, *) {
return [[.list,.banner,.sound]] return [[.list,.banner,.sound]]
} else { } else {