[UI Testing] Verify Local Notifications When App Is Terminated

When my app is terminated, a warning is immediately presented to the users. I want to write a UI test for this behavior. I now have an XCUI application, I know I can terminate the app using terminate()from XCTest.

After the XCUI application is terminated, a local notification should show up. Is there any way to access the notification and verify its existence and content?

You should be able to access a system notification by looking at the elements of the iOS system app, SpringBoard. You can access elements in springboard by creating an XCUIApplication for it- XCUIApplication(bundleIdentifier: "com.apple.springboard")

[UI Testing] Verify Local Notifications When App Is Terminated
 
 
Q