Post

Replies

Boosts

Views

Activity

Reply to iOS deep linking with Xcode UI testing
Following some of the recent answers, here is a working solution for SwiftUI that I am using to deep link into parts of the app for our UITests. func launchDeepLink(with url: URL) { addUIInterruptionMonitor(withDescription: "System Dialog") { (alert) -> Bool in let button = alert.buttons.element(boundBy: 1) if button.exists { button.tap() } return true } if #available(iOS 16.4, *) { XCUIDevice.shared.system.open(url) } } It includes the functionality to confirm the alert view that will pop up. Only tested this in SwiftUI using the .onOpenURL view modifier. Note that it is using the open call on XCUISystem not XCUIApplication as that causes the flakey experience some have mentioned. Hope that helps :)
Sep ’23
Reply to iOS deep linking with Xcode UI testing
Following some of the recent answers, here is a working solution for SwiftUI that I am using to deep link into parts of the app for our UITests. func launchDeepLink(with url: URL) { addUIInterruptionMonitor(withDescription: "System Dialog") { (alert) -> Bool in let button = alert.buttons.element(boundBy: 1) if button.exists { button.tap() } return true } if #available(iOS 16.4, *) { XCUIDevice.shared.system.open(url) } } It includes the functionality to confirm the alert view that will pop up. Only tested this in SwiftUI using the .onOpenURL view modifier. Note that it is using the open call on XCUISystem not XCUIApplication as that causes the flakey experience some have mentioned. Hope that helps :)
Replies
Boosts
Views
Activity
Sep ’23
Reply to Undefined symbols for architecture arm64 in Xcode 14
@brandonK212 thanks, confirm adding -lAdobeMobile  to Other Linker Flags worked for me too
Replies
Boosts
Views
Activity
Sep ’22