Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Messages app in iOS-17 simulator doesn't send messages

UITests in my project use Messages app to open main application via deep link. But after update Xcode to v.15.0 I found that Messages doesn't work any more. Sending message doesn't take any effect - text just disappears, now new message appears. It makes no difference whether the message contains links or not. Has anyone encountered the same issue? How can this be fixed?

I couldn't find any settings for the Messages app in the simulator.

like image 635
Alex Avatar asked Oct 26 '25 06:10

Alex


1 Answers

I've found a workaround for this issue. Just using Spotlight to open links. It's even faster than using Messages.

class LinkHelper {    
 static func openFromMessages(_ urlString: String) {
     XCUIDevice.shared.press(.home)
     let spotlight = XCUIApplication(bundleIdentifier: "com.apple.Spotlight")
     spotlight.swipeDown()
     let textField = spotlight.textFields["SpotlightSearchField"]
     textField.tap()
     textField.tap(withNumberOfTaps: 3, numberOfTouches: 1)
     textField.typeText(urlString)
     if spotlight.buttons["Continue"].exists {
         spotlight.buttons["Continue"].tap()
     }
     sleep(2)
     let searchButton = spotlight.buttons["Search"]
     searchButton.tap()
     spotlight.collectionViews.cells.firstMatch.tap()
 }
}

like image 174
Alex Avatar answered Oct 29 '25 09:10

Alex



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!