Since upgrading my device (iPhone 11) to iOS 14.0.1, I have found addUIInterruptionMonitor() to not be triggered at all. It was working before on iOS 13.4.1, which was the last version I had installed.
My code:
addUIInterruptionMonitor(withDescription: "App Would Like to Send You Notifications") { (alert) -> Bool in
if alert.buttons["Allow"].exists {
alert.buttons["Allow"].tap()
return true
}
return false
}
XCUIApplication().tap() // interacting with the app to trigger the interruption monitor
Nothing in my code has changed since upgrading - the only thing that has changed is the iOS version installed. Has anyone else encountered similar?