private func acceptPermissionAlert() {
_ = addUIInterruptionMonitor(withDescription: "") { alert -> Bool in
if alert.buttons["Don’t Allow"].exists { //doesnt get here second time
alert.buttons.element(boundBy: 1).tapWhenExists()
return true
}
return false
}
}
,爲此不工作:處理程序是不叫的警報相關照片
在應用程序的開始,它的工作完美而對於通知acepting許可,但在這裏...不起作用。
你知道爲什麼嗎?
你是什麼意思?我應該在哪裏添加它? –