iOS 11.3 中显示安全警报的进程的包 ID 是什么?

What is the bundle Id of the process that displays security alerts in iOS 11.3?

我希望能够从 XCUITest 中解决这个问题,以便说

XCUIApplication(bundleIdentifier: "bundle Id").alerts.matching(Foo)

我已经知道 addUIInterruptionMonitor(withDescription: description), 但似乎我们可能需要等待警报出现。

它是 Springboard 应用程序,因此它的 Bundle ID 是 com.apple.springboard

当您 运行 您的测试时,您的日志中就有它。这是我的测试日志的摘录:

t =    31.89s Tap "Location service" Switch
t =    31.89s     Wait for com.mytestapp to idle
t =    31.95s     Find the "Location service" Switch
t =    32.01s         Wait for com.apple.springboard to idle
t =    32.05s     Synthesize event
t =    32.16s     Wait for com.mytestapp to idle