【发布时间】:2020-09-29 20:04:32
【问题描述】:
自从将我的设备 (iPhone 11) 升级到 iOS 14.0.1 后,我发现 addUIInterruptionMonitor() 根本不会被触发。它之前在 iOS 13.4.1 上运行,这是我安装的最后一个版本。
我的代码:
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
自升级以来,我的代码没有任何变化 - 唯一变化的是安装的 iOS 版本。有没有其他人遇到过类似的情况?
【问题讨论】:
-
有人修过吗?
标签: swift xcode xctest ios14 xcuitest