Код: Выделить всё
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
}
}
[img]https://i.stack .imgur.com/8AnMcl.png[/img]
В начале приложения оно работает идеально, принимая разрешение на уведомления, но здесь оно не работает. Почему это?
Подробнее здесь: https://stackoverflow.com/questions/399 ... -to-photos