diff --git a/OrderScheduling.xcworkspace/xcuserdata/zd.xcuserdatad/UserInterfaceState.xcuserstate b/OrderScheduling.xcworkspace/xcuserdata/zd.xcuserdatad/UserInterfaceState.xcuserstate index 9b71cac..a9dfdfd 100644 Binary files a/OrderScheduling.xcworkspace/xcuserdata/zd.xcuserdatad/UserInterfaceState.xcuserstate and b/OrderScheduling.xcworkspace/xcuserdata/zd.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/OrderScheduling.xcworkspace/xcuserdata/zd.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/OrderScheduling.xcworkspace/xcuserdata/zd.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist index edb264f..c347b7f 100644 --- a/OrderScheduling.xcworkspace/xcuserdata/zd.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +++ b/OrderScheduling.xcworkspace/xcuserdata/zd.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -3907,8 +3907,8 @@ filePath = "OrderSchedulingNotificationService/NotificationService.swift" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "64" - endingLineNumber = "64" + startingLineNumber = "65" + endingLineNumber = "65" landmarkName = "didReceive(_:withContentHandler:)" landmarkType = "7"> diff --git a/OrderScheduling/Main/SceneDelegate.swift b/OrderScheduling/Main/SceneDelegate.swift index c57a240..b1cb3ab 100644 --- a/OrderScheduling/Main/SceneDelegate.swift +++ b/OrderScheduling/Main/SceneDelegate.swift @@ -36,7 +36,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { func sceneDidBecomeActive(_ scene: UIScene) { if USER.isLogin == true,appIsAlive == true { - // 处理app收到推送后写入GROUP的数据,当app处于后台时才要弹出,app died不需要 + // 处理app收到推送后写入GROUP的数据,当app处于后台时才要弹出,app热启动时不需要 TOOL.dealWithOrderPushNotification { userInfo in TOOL.playAlertWith(userInfo: userInfo) } diff --git a/OrderSchedulingNotificationService/NotificationService.swift b/OrderSchedulingNotificationService/NotificationService.swift index 7f67ab5..b79e687 100644 --- a/OrderSchedulingNotificationService/NotificationService.swift +++ b/OrderSchedulingNotificationService/NotificationService.swift @@ -37,7 +37,7 @@ class NotificationService: UNNotificationServiceExtension { bestAttemptContent.body = body } - // 只有订单类型才写入group,因为需要弹窗和声音 + // 订单类型写入 if GROUP.isOrderPushNotification(userInfo: userInfo) == true { var sound : UNNotificationSound? @@ -53,13 +53,14 @@ class NotificationService: UNNotificationServiceExtension { GROUP.setBestAttemptContentUserInfo(bestAttemptContentUserInfo: userInfo) contentHandler(bestAttemptContent) }else{ + // 当group中没有订单类型的数据时才写入 if let isShowPop = (userInfo[pushNoti_broadcastKeywords_key] as? Bool), isShowPop == true { if let userInfo = GROUP.bestAttemptContentUserInfo,GROUP.isOrderPushNotification(userInfo: userInfo) == true { }else{ GROUP.setBestAttemptContentUserInfo(bestAttemptContentUserInfo: userInfo) } } - + // 语音播报能力不具备,只播放默认声音 if let broadcastKeywords = (userInfo[pushNoti_broadcastKeywords_key] as? String),broadcastKeywords.isEmpty == false { bestAttemptContent.sound = .default contentHandler(bestAttemptContent)