更新注释
This commit is contained in:
Binary file not shown.
@@ -3907,8 +3907,8 @@
|
|||||||
filePath = "OrderSchedulingNotificationService/NotificationService.swift"
|
filePath = "OrderSchedulingNotificationService/NotificationService.swift"
|
||||||
startingColumnNumber = "9223372036854775807"
|
startingColumnNumber = "9223372036854775807"
|
||||||
endingColumnNumber = "9223372036854775807"
|
endingColumnNumber = "9223372036854775807"
|
||||||
startingLineNumber = "64"
|
startingLineNumber = "65"
|
||||||
endingLineNumber = "64"
|
endingLineNumber = "65"
|
||||||
landmarkName = "didReceive(_:withContentHandler:)"
|
landmarkName = "didReceive(_:withContentHandler:)"
|
||||||
landmarkType = "7">
|
landmarkType = "7">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
|
|||||||
|
|
||||||
func sceneDidBecomeActive(_ scene: UIScene) {
|
func sceneDidBecomeActive(_ scene: UIScene) {
|
||||||
if USER.isLogin == true,appIsAlive == true {
|
if USER.isLogin == true,appIsAlive == true {
|
||||||
// 处理app收到推送后写入GROUP的数据,当app处于后台时才要弹出,app died不需要
|
// 处理app收到推送后写入GROUP的数据,当app处于后台时才要弹出,app热启动时不需要
|
||||||
TOOL.dealWithOrderPushNotification { userInfo in
|
TOOL.dealWithOrderPushNotification { userInfo in
|
||||||
TOOL.playAlertWith(userInfo: userInfo)
|
TOOL.playAlertWith(userInfo: userInfo)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ class NotificationService: UNNotificationServiceExtension {
|
|||||||
bestAttemptContent.body = body
|
bestAttemptContent.body = body
|
||||||
}
|
}
|
||||||
|
|
||||||
// 只有订单类型才写入group,因为需要弹窗和声音
|
// 订单类型写入
|
||||||
if GROUP.isOrderPushNotification(userInfo: userInfo) == true {
|
if GROUP.isOrderPushNotification(userInfo: userInfo) == true {
|
||||||
var sound : UNNotificationSound?
|
var sound : UNNotificationSound?
|
||||||
|
|
||||||
@@ -53,13 +53,14 @@ class NotificationService: UNNotificationServiceExtension {
|
|||||||
GROUP.setBestAttemptContentUserInfo(bestAttemptContentUserInfo: userInfo)
|
GROUP.setBestAttemptContentUserInfo(bestAttemptContentUserInfo: userInfo)
|
||||||
contentHandler(bestAttemptContent)
|
contentHandler(bestAttemptContent)
|
||||||
}else{
|
}else{
|
||||||
|
// 当group中没有订单类型的数据时才写入
|
||||||
if let isShowPop = (userInfo[pushNoti_broadcastKeywords_key] as? Bool), isShowPop == true {
|
if let isShowPop = (userInfo[pushNoti_broadcastKeywords_key] as? Bool), isShowPop == true {
|
||||||
if let userInfo = GROUP.bestAttemptContentUserInfo,GROUP.isOrderPushNotification(userInfo: userInfo) == true {
|
if let userInfo = GROUP.bestAttemptContentUserInfo,GROUP.isOrderPushNotification(userInfo: userInfo) == true {
|
||||||
}else{
|
}else{
|
||||||
GROUP.setBestAttemptContentUserInfo(bestAttemptContentUserInfo: userInfo)
|
GROUP.setBestAttemptContentUserInfo(bestAttemptContentUserInfo: userInfo)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 语音播报能力不具备,只播放默认声音
|
||||||
if let broadcastKeywords = (userInfo[pushNoti_broadcastKeywords_key] as? String),broadcastKeywords.isEmpty == false {
|
if let broadcastKeywords = (userInfo[pushNoti_broadcastKeywords_key] as? String),broadcastKeywords.isEmpty == false {
|
||||||
bestAttemptContent.sound = .default
|
bestAttemptContent.sound = .default
|
||||||
contentHandler(bestAttemptContent)
|
contentHandler(bestAttemptContent)
|
||||||
|
|||||||
Reference in New Issue
Block a user