Handler of addUIInterruptionMonitor is not called for Alert related to Photos
问题 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 } } and this doesnt work for: In the beginning of the app, it works perfect while acepting permission for notifications, but here... doesnt work. Do you know why? 回答1: Add: app.tap() at the end of the method. This is because you need to