XCUIApplication.open still does not call the AppDelegate.application(_:open:options:) even when it doesn't flake and opens the app.
Instead use XCUISystem.open. The trick to the popup is to async the open call (since it waits for the button to be pressed) while you simulate the button press from springboard:
let springboard = XCUIApplication(bundleIdentifier: "com.apple.springboard")
// If you previously launched your app, close the app with:
springboard.launch()
DispatchQueue.main.async {
// Need to async this because XCUIDevice.shared.system.open
// synchronously waits for a button to be pressed the first time.
XCUIDevice.shared.system.open(URL(string: domain + path)!)
}
if springboard.buttons["Open"].waitForExistence(timeout: 5) {
springboard.buttons["Open"].tap()
}
Post
Replies
Boosts
Views
Activity
kIOReturnNoResources means you don't have the correct permissions.
On macOS you can simply fix this by going into your target Signing & Capabilities App Sandbox USB