I am also getting the same issue and while digging it more I found that WebDeriverAgent was failing on build with the following reason and apparently it is due to the restrictions on some of the libraries. It has started happening from Xcode 14.
WebDeriverAgent Error:
Showing Recent Issues
Cannot link directly with dylib/framework, your binary is not an allowed client of /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks/XCTAutomationSupport.framework/XCTAutomationSupport for architecture arm64
So if anyone has a solution or the work around would be appreciated!