update
This commit is contained in:
@@ -19,9 +19,19 @@ class NotificationService: UNNotificationServiceExtension {
|
||||
|
||||
if let bestAttemptContent = bestAttemptContent {
|
||||
// Modify the notification content here...
|
||||
// bestAttemptContent.title = "\(bestAttemptContent.title) [modified]"
|
||||
let userInfo = bestAttemptContent.userInfo
|
||||
|
||||
|
||||
if let dict = GROUP.parserAlertToDictionary(userInfo: userInfo) {
|
||||
if let title = dict[pushNoti_title_key] {
|
||||
bestAttemptContent.title = title
|
||||
}
|
||||
if let body = dict[pushNoti_body_key] {
|
||||
bestAttemptContent.body = body
|
||||
}
|
||||
}else if let body = GROUP.parserAlertToString(userInfo: userInfo) {
|
||||
bestAttemptContent.body = body
|
||||
}
|
||||
|
||||
// 只有订单类型才写入group,因为需要弹窗和声音
|
||||
if GROUP.isOrderPushNotification(userInfo: userInfo) == true {
|
||||
var sound : UNNotificationSound?
|
||||
|
||||
Reference in New Issue
Block a user