【发布时间】:2019-02-28 14:47:58
【问题描述】:
我想在锁定屏幕模式下隐藏这些操作按钮。
有没有办法在 iOS 中检测到这一点?
if action == "allow.action" {
APIService.shared.updateCpeDeviceACL(cpe: cpe,vlan: vlan, device: deviceMac ?? "", portalUrl: "", acl: true, caller: self)
if(alertId != nil){
APIService.shared.deleteAlert(id: alertId ?? "", caller: self)
} else {
print("alertId = nil detetected !")
}
if(notificationType != "new-device"){
if(quarantineId != nil){
APIService.shared.allowDeviceToNetwork(id: quarantineId ?? "", caller: self)
} else {
print("quarantineId = nil detetected !")
}
}
} else if action == "delete.action" {
APIService.shared.deleteAlert(id: alertId ?? "", caller: self)
} else if action == "block.action" {
APIService.shared.updateCpeDeviceACL(cpe: cpe,vlan: vlan, device: deviceMac ?? "", portalUrl: "", acl: false, caller: self)
if(alertId != nil){
APIService.shared.deleteAlert(id: alertId ?? "", caller: self)
} else {
print("alertId = nil detetected !")
}
if(notificationType != "new-device"){
if(quarantineId != nil){
APIService.shared.denyDeviceToNetwork(id: quarantineId ?? "", caller: self)
} else {
print("quarantineId = nil detetected !")
}
}
} else {
awakeFromNotification = true
}
如何进一步调试?
【问题讨论】:
标签: swift push-notification apple-push-notifications swift4 swift4.2