update
This commit is contained in:
@@ -13,7 +13,7 @@ open class GroupData {
|
||||
public static let `default` = GroupData()
|
||||
let groudUserDefault = UserDefaults(suiteName: GROUPID)
|
||||
|
||||
// 判断推送能不能解析出字典
|
||||
// 解析出字典
|
||||
func parserAlertToDictionary(userInfo:[AnyHashable:Any]?) -> Dictionary<String,String>? {
|
||||
let aps = userInfo?[pushNoti_aps_key] as? [String:Any]
|
||||
|
||||
@@ -44,6 +44,30 @@ open class GroupData {
|
||||
return false
|
||||
}
|
||||
|
||||
// 解析需要播放的文字
|
||||
func parserBroadcastToString(userInfo:[AnyHashable:Any]?) -> String? {
|
||||
if let broadcastKeywords = (userInfo?[pushNoti_broadcastKeywords_key] as? String),broadcastKeywords.isEmpty == false {
|
||||
return broadcastKeywords
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// 判断是不是需要语音广播
|
||||
func isBroadcastPushNotification(userInfo:[AnyHashable:Any]?) -> Bool {
|
||||
if let broadcastKeywords = (userInfo?[pushNoti_broadcastKeywords_key] as? String),broadcastKeywords.isEmpty == false {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// 是否需要弹窗
|
||||
func isShowPopPushNotification(userInfo:[AnyHashable:Any]?) -> Bool {
|
||||
if let isShowPop = (userInfo?[pushNoti_isShowPop_key] as? Bool),isShowPop == true {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// 不需要记录
|
||||
public var bestAttemptContentUserInfo : [AnyHashable:Any]? {
|
||||
return groudUserDefault?.object(forKey: bestAttemptContentUserInfo_key) as? [AnyHashable:Any]
|
||||
|
||||
Reference in New Issue
Block a user