forked from AcaMate/AcaMate_iOS
[✨] 푸시 수신 부 약간 변경
This commit is contained in:
parent
05f11df5e8
commit
655144a2ee
Binary file not shown.
|
@ -100,6 +100,7 @@ extension AppDelegate: UNUserNotificationCenterDelegate {
|
|||
// 앱 켜져있을때 알럿 받으면 직접 로컬로 알림 띄워주는 곳
|
||||
func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification) async -> UNNotificationPresentationOptions {
|
||||
let userInfo = notification.request.content.userInfo
|
||||
printLog(userInfo)
|
||||
|
||||
if let apsData = userInfo["aps"] as? [AnyHashable: Any],
|
||||
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, *) {
|
||||
return [[.list,.banner,.sound]]
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue
Block a user