Post

Replies

Boosts

Views

Activity

Reply to iOS deep linking with Xcode UI testing
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() }
Jun ’23
Reply to Could not resolve host: static.rust-lang.org
FB22283961
Replies
Boosts
Views
Activity
3d
Reply to iOS deep linking with Xcode UI testing
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() }
Replies
Boosts
Views
Activity
Jun ’23